Why am I getting index of / after installing my SSL certificate?


I installed a one-click instance of wordpress and have tried to use certbot to install an ssl certificate from let's encrypt.

Using this Virtual Host configuration:

ServerAdmin admin@mydomain
ServerName mydomain
ServerAlias www.mydomain
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

Getting this when I visit the site:

Index of /
Apache/2.4.38 (Debian) Server at mydomain Port 443

Any ideas what might be going wrong?

3 Replies

@Maudiggity --

The virtual host for port 443 is most likely configured only minimally. The good news is that the virtual host for port 443 is working correctly. Click on the little padlock icon in your browser next to the URL to see if it gives you correct details about your certificate.

My guess is that the 'one-click install' installed WP in a virtual host for port 80. You can verify this by browsing to http://yoursite.com:80/ and see if you get some kind of welcome banner from WP.

Check the site configuration(s) in /etc/apache3/sites-{available, enabled} and make sure they are correct.

-- sw


Still getting the index of / when visiting the port 80 of my site.

None of the rest made sense to me, unfortunately.

@Maudiggity --

Well, without basic knowledge of how to configure the Apache web server to serve your site, you're not going to get very far…and nobody here is going to be able to explain it to you. Here are some Apache guides that Linode publishes:

  1. Configuration Basics
  2. Configuration Structure
  3. Web server on Debian & Ubuntu
  4. Access Control

These are in increasing order of complexity.

Unfortunately, most of the books on amazon.com about Apache administration are all really dated. I wouldn't recommend any of them.

I hope this helps…

-- sw


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct