vhosts configuration for 443
Posted: 28. July 2021 04:28
Can you suggest the correct way to redirect to HTTPS (443) in case port 8082 is hit. The website (Mediawiki) correctly works on port 8082 as http://myserver1:8082/mywiki/index.php/Main_Page. I need to run on [port 443 (HTTPS).
I have created the certificate (crt) and key page and also done the domain name remapping on the Windows side (myserver1 correctly maps to https://wiki.my.mydomain.org/).
However, I think my redirect configuration in The following is my configuration in httpd-vhosts.conf file is incorrect. In this file, for port 8082 (where it runs as HTTP) it may not be correct, and as such, it does not redirect to 443 (for it to run as HTTPS).
The following is my configuration in httpd-vhosts.conf (and mod_SSL etc. are enabled):
I have created the certificate (crt) and key page and also done the domain name remapping on the Windows side (myserver1 correctly maps to https://wiki.my.mydomain.org/).
However, I think my redirect configuration in The following is my configuration in httpd-vhosts.conf file is incorrect. In this file, for port 8082 (where it runs as HTTP) it may not be correct, and as such, it does not redirect to 443 (for it to run as HTTPS).
The following is my configuration in httpd-vhosts.conf (and mod_SSL etc. are enabled):
- Code: Select all
<VirtualHost *:8082>
ServerName myserver1
[color=#4000FF] # The redirect below does not work -- Please suggest[/color]
[color=#BF0000] Redirect /mywiki/ https://wiki.my.mydomain.org/mywiki/[/color]
</VirtualHost>
<VirtualHost *:443>
DocumentRoot "C:/Xampp/htdocs/mywiki"
ServerName myserver1
ServerAlias wiki.my.mydomain.org
SSLEngine on
SSLCertificateFile "C:/Xampp/Certificates/2021/wiki.my.mydomain.org.crt"
SSLCertificateKeyFile "C:/Xampp/Certificates/2021/wiki.my.mydomain.org.key"
<Directory "C:/Xampp/htdocs/mywiki">
Options All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>