Adding a vhost for something.server.com

Mattie

Verified User
Joined
Jun 1, 2008
Messages
123
So,

I want to use observium and therefore have it on "observium.server.com". I don't want to create this as a subdomain (as I want a specific document root) so I simply want to add an extra vhost.

But:
Where do I add this to that it works but is not overwritten by DA?

I've found the following:
/etc/apache2/sites-enabled
/etc/httpd/conf/extra/httpd-vhosts.conf

But adding something there does not work (I still get the "Apache is functioning normally" page).

It is probably really simple but I cannot find the correct place, can someone point me in the right direction?

(note: adding a symlink in /var/www/html does not work as observium uses "host.com/css" and in that case not the required "host.com/observium/css")
 
Yes that could work but that is not what I'm looking for. What if I have more services, nagios, cacti whatever? Then I need to add those tags for everything. There must be a way for the system admin to add custom vhosts without being overwritten by DA? Right guys....?
 
Templates in the /custom directory won't ever by overwritten by DA unless you overwrite them yourself.

If you want it for all subdomains, you can either create one for every subdomain or maybe using wildcard subdomains is a solution?
https://help.directadmin.com/item.php?id=127

I'm just wondering... can't this also be done by creating subdomain A records in dns and creating the subdomain on server2?
 
But I don't want a template :)

I want manually add 1 vhost for "observium.server.com" :) So not observium.domainA.com or domainB.com, just a single vhost.

Yes I can create an A record but in that case apache still doesn't know what to do with the request.
 
Yes I can create an A record but in that case apache still doesn't know what to do with the request.
Oeps, I'm sorry, I confused this with another question from somebody else to host the subdomain on a different server.

I got a bit confused anyway which is the difference between subdomain.domain.com with custom root dirs like in the help files and a single vhost.
I just don't understand why not a custom template, imho that's the only way this can be done without being possible to be overwritten by DA.
Most customisable like this:
https://help.directadmin.com/item.php?id=2

Maybe Zeiter or Sellerone can give you some more help, I might learn another way then too.:)
 
Well, the template is an option but to my opinion it seems strange to include an "if" statement in every generated vhost config file just for the single item I want to add :)
 
Back
Top