
Antes de agregar el certificado pude acceder al siguiente sitio
http://website.com:4043/web/login
Pero después de agregar el certificado no puedo acceder a la URL completa con https.
Sin embargo sólo puedo accederhttps://sitioweb.com
Cualquier apoyo por favor.
Respuesta1
Suponiendo que está ejecutando una versión moderna de Ubuntu, querrá asegurarse de que su archivo de configuración virtual de Apache se vea así:
Listen 443
Listen 4043
<VirtualHost *:443>
ServerName website.com
SSLProxyEngine on
SSLEngine on
SSLCertificateFile /etc/ssl/certs/server.crt
SSLCertificateKeyFile /etc/ssl/private/server.key
DocumentRoot /var/www/html
</VirtualHost>
<VirtualHost *:4043>
ServerName website.com
SSLProxyEngine on
SSLEngine on
SSLCertificateFile /etc/ssl/certs/server.crt
SSLCertificateKeyFile /etc/ssl/private/server.key
DocumentRoot /var/www/html
</VirtualHost>
Desde aquí, puede configurar una pequeña .htaccess
regla rápida para garantizar que el tráfico se redirija correctamente en 4043
lugar del servidor predeterminado 443
. Por ejemplo:
RewriteEngine on
# If the port isn't 4043
RewriteCond %{SERVER_PORT} !^4043$
# We redirect to the same address with the proper port
RewriteRule ^(.*)$ https://%{HTTP_HOST}:4043/$1 [R=301,L]
IMPORTANTE:No se limite a copiar y pegar estas cosas. Mire el texto y haga ajustes para su propio entorno, que todos desconocen.exceptotú.