LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Why site over SSL is not working (https://www.linuxquestions.org/questions/linux-server-73/why-site-over-ssl-is-not-working-4175553613/)

Abdizriel 09-15-2015 10:45 PM

Why site over SSL is not working
 
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>


/dev/random 09-21-2015 03:28 PM

Quote:

Originally Posted by Abdizriel (Post 5420971)
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>



Stupid question... is the module being loaded? (mod_ssl)?


All times are GMT -5. The time now is 04:42 AM.