Default vhost / server homepage

S2S-Robert

Verified User
Joined
Jun 24, 2003
Messages
415
Location
The Netherlands
Hi,

I know that for the default server page (the one that's first called if the domain isn't recognised by another vhost) it takes the first vhost.

Problem is, it doesn't. in the httpd.conf there the vhosts are included, but the default page doesn't resemble any of domains listed there.

Does anybody know where I should put my default server vhost? I want to create a sort of 'server <servername>' page, and I don't want the server path (/var/www/html) to be changed since it would screw up MRTG / Cacti / whatever.

Regards
 
I found the vhost for the default page, and now it's functioning properly:

Code:
#The default site for the server.
<VirtualHost |SERVER_IP|:80>

<VirtualHost |SERVER_IP|:443>

The question now is : will it hold after the httpd.conf is regenerated, or is the primary httpd.conf not regenerated? If so, I think it should be in /templates.

Regards

Robert
 
The main httpd.conf is not overwritten, any changes made to it will not be overwritten.
 
Sorry, I'm a bit confused.

What do you mean by "main httpd.conf"?

a) /etc/httpd/conf/httpd.conf
b) /usr/local/directadmin/data/templates/httpd.conf

Well, my confusion comes from the fact that I've been trying to understand how DA manages the "active" (main?) httpd.conf :confused:

When running customapache/build (to install/upgrade apache) it makes a backup of the active httpd.conf, then installs apache, then restores httpd.conf

Is this the process you're refering to (?)

It seems /etc/httpd/conf/httpd.conf is based on /usr/local/directadmin/data/templates/httpd.conf, which comes from the DA installation (setup.sh)

However (this is what I do not understand), WHO creates (and WHEN) the initial copy of /etc/httpd/conf/httpd.conf ?

So, should we care about /usr/local/directadmin/data/templates/httpd.conf? ...or is this file used only the first time DA is installed? ...could this be overridden when upgrading DA?

Thanks
 
Last edited:
/etc/httpd/conf/httpd.conf is not overwritten. The httpd.conf in the templates directory is only used for the initial installation (or if you need to recreate it)
customapache backs it up because it is good practice and Directadmin does not modyfy anything except the include users httpd.conf files which is located at the very bottom of the main httpd.conf

You can make any changes you want to /etc/httpd/conf/httpd.conf without having to worry about it being overwritten. Only the individual user httpd.conf files(/usr/local/directadmin/data/username/httpd.conf) are overwritten by DA, those are the custom virtual host templates in the templates directory. You can also modify individual user httpd.conf files without applying something to all of them through.

References:
http://help.directadmin.com/item.php?id=2
http://help.directadmin.com/item.php?id=3
 
Back
Top