How is the Custom HTTPD Configurations editor supposed to work?

jlixfeld

Verified User
Joined
Jun 1, 2009
Messages
60
I'm trying to simply set "Dav On" with a few hooks in <Directory> on a subdomain vhost. Whenever I enter my text, it seems to unpredictably add it to a bunch of different spots in the httpd.conf for the domain in question. I'm most certainly doing something wrong, so I'm hoping someone can provide some guidance. Here's what I'm putting into the text area:

<VirtualHost 1.1.1.1:443>
ServerName www.files.mydomain.com
<Directory /home/username/domains/mydomain.com/private_html/files>
Dav On
Order Allow,Deny
Allow from all
AuthType Digest
AuthName DAV-upload
# You can use the htdigest program to create the password database:
# htdigest -c "/etc/httpd/user.passwd" DAV-upload admin
AuthUserFile "/etc/httpd/user.passwd"

<LimitExcept GET OPTIONS>
require user admin
</LimitExcept>

My understanding is that the parser is smart enough to insert the Dav On and associated text inside the existing virtualhost 1.1.1.1:443 where the ServerName is www.files.mydomain.com and where the Directory is /home/username/domains/mydomain.com/private_html/files. It seems my logic is flawed.

Can anyone give me some pointers? Can this be done from the web interface or should I edit the conf by hand?
 
Thanks for the link. Now, if I'm correctly understanding what it is that I'm reading, it seems to me that any change I make here affects all virtualhosts for the domain. That said, it doesn't seem like I can add specific text for only one virtualhost without having it affect the others.

Is this correct, or am I still not getting it?
 
Ok, all I'm looking to do is a simple one-off to enable dav on one subdomain. I don't care about having all subdomains for one domain inherit this change; this is just for one subdomain, and that's it.

Do I really have to go through all this copying the virtual_host*.conf templates and rewriting for this one, small, seemingly trivial change?
 
In the meantime, I'm look into the custom stuff more. I've got my Dav stuff setup inside an If/Else, but I don't know what to match it against. I've tried a bunch of stuff:

Code:
|?FOO=bar|
|*IF FOO=bar|
Dav On
Other_Foo
|*endif|

Code:
|*IF |SUB|.|DOMAIN|=foo.bar.com|
Dav On
Other_Foo
|*endif|

Code:
|*IF `SUB`.`DOMAIN`=foo.bar.com|
Dav On
Other_Foo
|*endif|

Code:
|*IF SERVER_ALIAS=foo.bar.com|
Dav On
Other_Foo
|*endif|

None of these seem to have any effect after the configs are rewritten via echo "action=rewrite&value=httpd...blah...blah..."
 
Back
Top