Hi there, i am trying to install my SSL certificate and the problem seems to be that
As soon as the virtualhost port in /etc/apache2/sites-available/default-ssl.conf or 000-default.conf is changed from 80 to 443 (needed for SSL) my website gets directed to a index folder of the html
I am running Ubuntu 14.04 w/wordpress & apache
Any help whatsoever to solve this is appreciated
Here is what my 000-default.conf looks like
<VirtualHost *:443> ServerName prollagen.com SSLEngine on SSLCertificateFile /etc/ssl/key (redacted) SSLCertificateKeyFile /etc/ssl/key (redacted) SSLCertificateChainFile /etc/ssl/key (redacted) DocumentRoot /var/www/html
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I would recommend trying to add
DirectoryIndex index.php index.html
and restarting apache with
service apache2 restart
This will direct apache to use your index.php file rather than showing a directory index.
So cloudflare was the problem! As with “Options -Indexes”, when placing - in front of indexes apache throws out an error stating “if an option has - or +, all other options must have the same”
What would another “option” be within 000-default?
Try running the command below and post the output.
apachectl configtest
Beyond that, Apache can be finicky at times, so you may want to try defining the DocumentRoot at the top, so your configuration would end up looking like:
<VirtualHost *:443>
DocumentRoot "/var/www/html"
ServerName prollagen.com
ServerAlias *.prollagen.com
SSLEngine On
SSLCertificateFile /etc/ssl/key
SSLCertificateKeyFile /etc/ssl/key
SSLCertificateChainFile /etc/ssl/key
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Note, I added a ServerAlias line below ServerName to allow other requests to resolve to the primary domain. You should also setup a similar block to allow requests on port 80 as well.
Using the above, you’re essentially telling Apache to listen on Port 443 only.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.