Apache keeps changing my conf

flashwiregsn

Verified User
Joined
Apr 12, 2005
Messages
16
Whenever I add a subdomain or domain to my account, it resets my changes to httpd.conf. I run a CentOS mirror, and it's important that Indexing is enabled, but whenever I add a domain or subdomain, it changes every entry from +Indexes to -Indexes and pretty much cripples my mirror, and no one can access the directory. Is there some way to disable this? How can I deal with this? Adding subdomains on a regular basis and having to edit the conf every time really isn't fun for me.
 
Use +Indexes in a .htaccess file instead of the httpd.conf file. How are you applying your changes to the httpd.conf file? In order for custom changes to be kept safe you must do it through the Admin level.
 
I've been modifying the httpd.conf of the user controlling the mirror as root. This still does not stop Apache/DA from messing with it, and I'm pretty sure root is at or above admin level ;)

I've tried putting both "Options +Includes +Indexes" and "+Indexes" in .htaccess, but it still didn't work after restarting apache.
 
.htaccess has always worked for me.
Make sure the main httpd.conf allows for these kinds of overrides.

It doesn't matter who makes the changes, root or not DirectAdmin will still rewrite all user httpd.conf files according to the template in /usr/local/directadmin/data/templates
This will overwrite any changes you make unless you make it through DirectAdmins custom httpd.conf page in the admin level.

You could modify the templates to include +Indexes, but in that case you might aswell enable it server-wide in the master httpd.conf file. Then if users don't want their directories to be displayed they can create the proper .htaccess
 
How do I change the -/+Indexes option in the Custom HTTPD.conf in the admin panel? It's rather confusing and I can't seem to get it to work.
 
Back
Top