Hello,
I've got problem with setting site over SSL with httpd.
My configuration is following for *:80
Code:
Listen 80
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@site.com
DocumentRoot /var/www/dev
DirectoryIndex index.php index.html
ServerName www.site.com
ErrorLog logs/site.com-error_log
CustomLog logs/site.com-access_log common
<Directory /var/www/dev>
RewriteEngine On
RewriteOptions Inherit
Options All
AllowOverride FileInfo
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
So I thought that if I copy it and add data needed for SSL it will work. However, when I do that I've got httpd default page.
If I input in my address:
https://site.com/public/index.php I can see that it's 'working there so it means that I'm in document root but default page is not loaded from /public/index.php as it should be done from .htaccess:
Code:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
</IfModule>
So question is why with similar cofiguration for https as for http it's not working?
Code:
Listen 443
NameVirtualHost *:443
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@site.com
DocumentRoot /var/www/html
DirectoryIndex index.php index.html
ServerName www.site.com
ErrorLog logs/site.com-error_log
CustomLog logs/site.com-access_log common
SSLCertificateKeyFile /path/to/key
SSLCertificateFile /path/to/cert
SSLCACertificateFile /path/to/cert
<Directory /var/www/html>
RewriteEngine On
RewriteOptions Inherit
Options All
AllowOverride FileInfo
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
</IfModule>