This might be a newbie question but… I configured a SSL site in Apache as follows:
NameVirtualHost *:443
<VirtualHost *:443>
ServerName dev.wonnova.com
DocumentRoot "/var/www/myapp/wwwroot"
SSLEngine on
SSLProtocol -all +TLSv1 +SSLv3
SSLCipherSuite HIGH:MEDIUM:!aNULL:+SHA1:+MD5:+HIGH:+MEDIUM
SSLCertificateFile /etc/apache2/ssl/mycert.crt
SSLCertificateKeyFile /etc/apache2/ssl/mycert.key
<IfModule mime.c>
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
</IfModule>
Alias /mydir/ "/var/www/myapp/mydir"
<Directory "/var/www/myapp/mydir">
SSLRequireSSL
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
The thing is that no matter which URL I request, I always get the contents of /var/www/myapp/wwwroot/index.php (i.e. index.php in DocumentRoot directory). It happens for these URLs, as an example:
- https://mysite/index.php
- https://mysite/mydir/index.php
- https://mysite/mydir/style.css
- https://mysite/mydir/script.js
On the other hand, if I create an index2.php file in DocumentRoot directory, it shows correctly:
- https://mysite/index2.php
I guess there’s something that is wrong with my Apache configuration.
I solved the issue, I had to remove the last slash of the first part of the Alias line.
This was wrong:
This is right: