?>/script>'; } ?> configuracion httpd Widgets Magazine

Autor Tema: configuracion httpd  (Leído 4933 veces)

0 Usuarios y 1 Visitante están viendo este tema.

dynyly

  • Visitante
configuracion httpd
« en: 31-03-2018, 00:49 (Sábado) »
salu2
depues de mucho enredar tengo pedir consejo o ayuda pues no soy capaz
tengo virtualhost funcionado en puerto 80 bien pongo mi ip publica y redirecciona perfec
consigo cert todo bien pero cuando intento intalar certificados no me redireciona no me sale nada
el virtualhost en puerto 80 funciona pero con el 443 no se que le pasa a mi configuracion
se que es un poco largo pero para exponer debe ser asi perdon si que muy largo el post
en el router


creo que todo bien
configuracion del vhost
Código: [Seleccionar]
calochorro ~ # httpd -S -D /etc/httpd/extra/httpd-vhosts.conf

VirtualHost configuration:
ServerRoot: "/usr"
Main DocumentRoot: "/var/www/dominio.tk"
Main ErrorLog: "/var/log/httpd/error_log"
Mutex ssl-stapling-refresh: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/" mechanism=default
Mutex cache-socache: using_defaults
PidFile: "/var/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: /etc/httpd/extra/httpd-vhosts.conf
User: name="apache" id=80
Group: name="apache" id=80

Código: [Seleccionar]
calochorro ~ # httpd -S -D /etc/httpd/httpd.conf
VirtualHost configuration:
ServerRoot: "/usr"
Main DocumentRoot: "/var/www/dominio.tk"
Main ErrorLog: "/var/log/httpd/error_log"
Mutex ssl-stapling-refresh: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/" mechanism=default
Mutex cache-socache: using_defaults
PidFile: "/var/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: /etc/httpd/httpd.conf
User: name="apache" id=80
Group: name="apache" id=80

Código: [Seleccionar]
calochorro ~ # httpd -S -D /etc/httpd/extra/httpd-ssl.conf
VirtualHost configuration:
ServerRoot: "/usr"
Main DocumentRoot: "/var/www/dominio.tk"
Main ErrorLog: "/var/log/httpd/error_log"
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/" mechanism=default
Mutex cache-socache: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex rewrite-map: using_defaults
PidFile: "/var/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: /etc/httpd/extra/httpd-ssl.conf
User: name="apache" id=80
Group: name="apache" id=80


hago pruebas de dominio y host
Código: [Seleccionar]
calochorro ~ # getent hosts
xxxxxxxx-mi-ip  dominio.tk.example.net dominio.tk www.dominio.tk
calochorro ~ # host dominio.tk
dominio.tk. has address xxxxx mi ip publica
calochorro ~ # ping -c 1 dominio.tk
PING dominio.tk..example.net (xxxxxx mi ip publica) 56(84) bytes of data.
64 bytes from dominio.tk.example.net (xxxxxx mi ip publica): icmp_seq=1 ttl=64 time=4.54 ms

--- dominio.tk.example.net ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 4.542/4.542/4.542/0.000 ms


no me arroja fallos de configuracion pero no me entra por el puerto 443

configuracion de vhost
Código: [Seleccionar]
<VirtualHost *:80>
DocumentRoot "/var/www/dominio.tk"
ServerName  dominio.tk
ServerAlias www.dominio.tk
ErrorLog "/var/log/httpd/dominio.tk-error_log"
CustomLog "/var/log/httpd/dominio.tk-access_log" common
</VirtualHost>

<VirtualHost *:443>
        ServerName dominio.tk
        ServerAdmin webmaster@dominio.tk
        DocumentRoot /var/www/dominio.tk
        
        ErrorLog "/var/log/httpd/dominio-error_log"
        CustomLog "/var/log/httpd/dominio-access_log" combined
        
        SSLEngine On
        #SSLCertificateFile /etc/letsencrypt/live/dominio.tk/cert.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/dominio.tk/privkey.pem
        SSLCertificateChainFile /etc/letsencrypt/live/dominio.tk/chain.pem
 
        Header always set Strict-Transport-Security "max-age=15768000"
 
        RequestHeader append "X-Forwarded-Proto" "https"
        RequestHeader set "X-Forwarded-Ssl" "on"
</VirtualHost>

SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
SSLHonorCipherOrder on
SSLCompression off
SSLSessionTickets off

SSLUseStapling on
SSLStaplingResponderTimeout 5
SSLStaplingReturnResponderErrors off
SSLStaplingCache shmcb:/var/run/ocsp(128000)

no sigo con la con la configuracion de httpd.conf porque seria muy largo el post pero se ve que consola no me arroja fallos pero es accesible por puerto 80
hay algo que se pase o que vean malo en mi configuracion me seria de gran ayuda

« Última modificación: 31-03-2018, 00:53 (Sábado) por dynyly »

TheWolf

  • Visitante
Re: configuracion httpd
« Respuesta #1 en: 31-03-2018, 11:51 (Sábado) »
Hola

Citar
pero cuando intento intalar certificados no me redireciona no me sale nada
el virtualhost en puerto 80 funciona pero con el 443 no se que le pasa a mi configuracion

Envia tu configuracion pero que te dice la console cuando intentas de poenr el SSL ? y con cual methoda lo has instalado ? porque ya veo let's encrypt y hay muchas manejas por instalar el SSL, nos sale tu configuracion pero no la méthoda de instalacion que has hecho... no hay secreto con eso en wifi-libre he hecho un tutorial con eso.

Wifislax tiene curl ? para hacer pruebas con tu dominio.
Código: [Seleccionar]
curl -i https://midominioy
Código: [Seleccionar]
curl -i https://ippublica
O sino pasa por wireshark ver lo que sale.

No conosco bien httpd pero hay que activar el ssl tambien, ejemplo del comando con apache2:
Código: [Seleccionar]
a2enmod ssl
service apache2 reload
service apache2 restart

Tendras algo asi que ver por empezar.

dynyly

  • Visitante
Re: configuracion httpd
« Respuesta #2 en: 31-03-2018, 21:56 (Sábado) »
gracias por responder se agardece
poco a poco todo se anda los porros; a veces debes leer 4 o 5 veces para captarlo en un dia claro sin nubes de canabis todo se coge  ;D
pero me sale algo raro expongo una imagen vale mas







Código: [Seleccionar]
curl -i https://www.calochorro.tk
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

algo falla que no termina de convencer

guest178389

  • Visitante
Re: configuracion httpd
« Respuesta #3 en: 01-04-2018, 01:24 (Domingo) »
eso es porque el certificado a sido creado para www.dominio.tk
y no para la ip-publica
por eso te sale bien en el dominio pero no en la ip.

TheWolf

  • Visitante
Re: configuracion httpd
« Respuesta #4 en: 01-04-2018, 12:04 (Domingo) »
Puès ya anda no ?

Veo tu sitio en https como se tene que ser.

dynyly

  • Visitante
Re: configuracion httpd
« Respuesta #5 en: 07-04-2018, 01:46 (Sábado) »
elimino post pues he visto
que se ha de pedir regitro dns ptr inversa a movistar
 lo demas todo bien lo redactado el post
gracias
« Última modificación: 07-04-2018, 15:45 (Sábado) por dynyly »