Custom httpd.conf modifications

Peter Verrill

Verified User
Joined
Nov 19, 2003
Messages
49
Hey,

I have recently started offering free hosting supported by ads.

Some users don't seem to listen when I ask them to apply the banner code to their sites so I have implemented mod_layout.

But for mod_layout to work I have to add code to here which is in the user.conf:

<Directory /home/ati/domains/DOMAIN/public_html>
*HERE*
</Directory>

If I use the Httpd.conf Customization feature of DA, it adds the code at the top of the <VirtualHost IP:80> bit and not within the <Directory..> this then breaks apache.

I have gotten this to work by manually adding it to the user.conf but it says at the top:
# Auto generated apache config file by DirectAdmin version 1.22.1
# Modifying this file is not recommended as any changes you make will be
# overwritten when the user makes any changes to his/her website

So is there a way for this to be included in the correct place?

Peter Verrill
 
Hello,

You have 2 options, both involve the template system.

1) cd /usr/local/directadmin/data/templates/
cp virtual_host*.conf custom
cd custom

edit the virtual_host*.conf files and move |CUSTOM| to go in between the <Directory .. > tags. When you add your custom httpd.conf code, it will be inserted into the correct place

2) leave the |CUSTOM| tag alone and just add the code you want directly to the templates. Note that doing this will force *all* domains, (including your own) to have this change.

See http://help.directadmin.com/item.php?id=2 for more info.

John
 
Back
Top