Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I was trying to install a SSL certificate on my VPS. I Generated the CSR, and Got the Certificate and Intermediate CA. I am working on apache 2 on ubuntu server 13.10. So I used the Default SSL virtual host in sites-available and configured the default-ssl according to the Certificate vendor company instruction. Here is what i did,

<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerAdmin webmaster@localhost
    ServerName www.buysellswapit.com
    DocumentRoot /sites/bswapit
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /sites/bswapit>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
    </Directory>
    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
            AllowOverride None
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    </Directory>
    ErrorLog ${APACHE_LOG_DIR}/error.log

    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined

    SSLEngine on

    SSLCertificateFile    /var/ssl/www_buysellswapit_com.crt
    SSLCertificateKeyFile /var/ssl/www_buysellswapit_com.key

    SSLCertificateChainFile /var/ssl/www_buysellswapit_com_im.crt

    <FilesMatch "\.(cgi|shtml|phtml|php)$">
            SSLOptions +StdEnvVars
    </FilesMatch>
    <Directory /usr/lib/cgi-bin>
            SSLOptions +StdEnvVars
    </Directory>
     BrowserMatch "MSIE [2-6]" \
            nokeepalive ssl-unclean-shutdown \
            downgrade-1.0 force-response-1.0
    # MSIE 7 and newer should be able to use keepalive
    BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
</IfModule>

And then Reloaded the apache, Nothing happened. Then I thought about checking the configuration loading through apache, and it was apache2.conf, Although i didn't make any change on apache2.conf . Then i check the port.conf and made it to listen on 443 port ! Reloaded the apache, and for safety, Restarted it. The Same again ! SSL isn't working !

Here is the port.conf file,

NameVirtualHost *:80
Listen 80
<IfModule mod_ssl.c>

  Listen 443
</IfModule>
<IfModule mod_gnutls.c>
  Listen 443
</IfModule>

Now, What am i doing wrong?

share|improve this question
    
Anything in your logs? –  ETL Feb 24 at 23:54
    
nope, Nothing relevant ! –  Oritro Ahmed Feb 24 at 23:55

1 Answer 1

up vote 1 down vote accepted

Try running:

a2ensite default-ssl

or:

cd /etc/apache2/sites-enabled && ln -s ../sites-available/default-ssl

and:

service apache2 restart

share|improve this answer
    
Did all of that ! Default-ssl is enabled but server isn't responding with https ! –  Oritro Ahmed Feb 24 at 23:54
    
Even running a2enmod ssl and restarting apache? –  fgbreel Feb 24 at 23:55
    
God damn, the answer was always in front of my eyes and i didn't saw it. Forgot to enable SSL Module. Thanks Man. –  Oritro Ahmed Feb 24 at 23:59
    
These things happen. You're welcome! –  fgbreel Feb 25 at 0:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.