2

I am trying to set up an virtual Host with Apache HTTP Server,everythings works fine except that i cant disable Indexes in my httpd.conf file.

What i have : In my httpd.conf

 <Directory /> Options FollowSymLinks Includes ExecCGI Require all granted </Directory> 

In my httpd.vhosts.conf

<Directory ****> Options -Indexes FollowSymLinks Includes ExecCGI Require all granted </Directory> 

I thought -Indexes would remove the "index-of" and would instead show my html-file.

Hope someone can help me out with this...

1 Answer 1

3

From the Apache documentation:

Note Mixing Options with a + or - with those without is not valid syntax and will be rejected during server startup by the syntax check with an abort.

So in other words you cannot have:

Options -Indexes FollowSymLinks Includes ExecCGI 

But must instead have this syntax to alter the existing Options settings:

Options -Indexes +FollowSymLinks +Includes +ExecCGI 

Or this syntax to just overwrite the existing Options settings:

Options FollowSymLinks Includes ExecCGI 

However I'm confused why you think you need "-Index" as you have not specified that in you main httpd.conf, so it should not be generating the index pages anyway in your vhost sub location?

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.