Can you please suggest to me the steps so that all the HTTP paths get redirected to the HTTPS (port 443) with a certificate for the MediaWiki installed in the Windows server?
The application (MediaWiki) currently works with HTTP as http://myserver1:8082
I have obtained an SSL certificate (key, crt files) and did various read-ups.
One suggestion was to keep every configuration as is (so that it continues using HTTPS on port 8082) but to add a single line in httpd-vhosts.conf to do the redirect as follows (whenever it sees mywiki in the URL, it will redirect to HTTPS:
<VirtualHost *:8082>
ServerName myserver1:8082
Redirect "/mywiki/" "https://mywiki.org/"
</VirtualHost>
Also, add a second entry in httpd-vhosts.conf as:
Listen 443
<VirtualHost *:443>
DocumentRoot "C:/Xampp/htdocs/mywiki"
ServerName www.mywiki.com
SSLEngine on
SSLCertificateFile "conf/ssl.crt/server.crt"
SSLCertificateKeyFile "conf/ssl.key/server.key"
<Directory "C:/Xampp/htdocs/mywiki">
Options All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I will do the necessary domain name re-mapping outside the Apache server.
I have not made any changes to httpd-ssl.conf. The httpd.conf indeed includes it (Include conf/extra/httpd-vhosts.conf), also enabled is (LoadModule ssl_module modules/mod_ssl.so).
I am using:
I am using in Windows server:
MediaWiki 1.35.2
Apache 2.4.47 Win64 from Xampp
mysql-8.0.23-winx64 (MySQL :: Download MySQL Community Server)
PHP 7.4.3
Can you please suggest the steps needed to direct all the web pages from HTTP to HTTPS?