Cannot serve directory /var/www/html/: No matching DirectoryIndex

I'm sure this question has been asked and answered, but I'm not finding a solution. I have a virtual host I have just added SSL to, and it isns't working as expected. The non-SSL version is working properly. Below is what I've got in httpd.conf:

<VirtualHost mysite.com:443> ServerAdmin [email protected] ServerName mysite.com ServerAlias DocumentRoot /var/www/html/ <Directory /var/www/html/ DirectoryIndex index.html index.htm index.php Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all Require all granted </Directory> SSLEngine on SSLCertificateFile /etc/pki/tls/certs/my.crt SSLCertificateKeyFile /etc/pki/tls/private/my.key
</VirtualHost>

The error I'm getting is:

[Thu Jan 11 12:29:58.984354 2018] [autoindex:error] [pid 19998] [client
IP:38470] AH01276: Cannot serve directory /var/www/html/: No matching
DirectoryIndex (index.html,index.php) found, and server-generated directory
index forbidden by Options directive

Obviously, I've got the directory set as /var/www/html/ but it's trying to serve content directly from /var/www/html.

I'm sure this is something simple, but my brain is already oatmeal from working on this site all day, so I'm probably just failing to see what's right in front of my face.

Thanks!

2

1 Answer

Fixed it. Simple enough, as I assumed. Change:

<VirtualHost mysite.com:443>

To:

<VirtualHost *:443>
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like