I recently installed an SSL certificate, but as a result, my nodejs app only appears on http://something.com, and the apache default/stock directory listing is on https://something.com. I made it so that I get redirected to the https on entering the site name, but I don't know how to forever get rid of the Apache server directory listing "Index of /"...in it's ugly times new roman font.

I run the new apache 2, so in /etc/apache2/sites-available I have my 000-default.conf saying:

<IfModule mod_ssl.c>
<VirtualHost *:*>
ProxyPreserveHost On

ProxyPass /
ProxyPassReverse /
ServerName something.com
Redirect permanent / https://something.com


I have a default-ssl.conf as well that has the address of the certificates and keys:

<VirtualHost _default_:443>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    SSLEngine on

    SSLCertificateFile /var/www/html/public.crt
    SSLCertificateKeyFile /var/www/html/private.key
    SSLCertificateChainFile /var/www/html/intermediate.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


# vim: syntax=apac

1 Answer 1


I would like to suggest nginx as ssl offloader for your nodejs backend app. Here's the link for SSL config generator by mozilla.

  • Thanks, not an answer for apache, but at the end of the day, Nginx and nodejs were meant to be so I'm switching over
    – Natu Myers
    Mar 15, 2016 at 1:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .