Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
    DocumentRoot /sites/bswapit
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    <Directory /sites/bswapit>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
            AllowOverride None
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    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
    <Directory /usr/lib/cgi-bin>
            SSLOptions +StdEnvVars
     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

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 mod_gnutls.c>
  Listen 443

Now, What am i doing wrong?

share|improve this question
Anything in your logs? – ETL Feb 24 '14 at 23:54
nope, Nothing relevant ! – Oritro Ahmed Feb 24 '14 at 23:55
up vote 1 down vote accepted

Enable the ssl module:

a2enmod ssl

then enable the ssl virtual host:

a2ensite default-ssl


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


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 '14 at 23:54
Even running a2enmod ssl and restarting apache? – fgbreel Feb 24 '14 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 '14 at 23:59
These things happen. You're welcome! – fgbreel Feb 25 '14 at 0:00

Your Answer


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.