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 / http://0.0.0.0:3000/
ProxyPassReverse / http://0.0.0.0:3000/
ServerName something.com
Redirect permanent / https://something.com
</VirtualHost>
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
</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>
# vim: syntax=apac