site Search:


 
    All Forums Hot Topics Gallery






how-to block ads


 
Search Topic:
Uniqs:
637
Share Topic
Posting?
Post a:
Post a:
Links: ·Forum Rules ·Getting noticed ·Webhosting FAQ ·Bandwidth FAQ
AuthorAll Replies


NOYB
St. John 3.16
Premium
join:2005-12-15
Forest Grove, OR
kudos:1

Apache httpd.conf VirtualHost ServerName as Var/Param

Can the Apache Web Server httpd.conf ServerName be set using variables/parameters obtained from the system such as host-name and domain-name?

Something like this for instance.
ServerName %TheHostName%.%TheDOmainName%

Goal:
systemname and domainname may be changed at any time and
one of the Virtual Hosts needs to responed to »systemname.domainname/ without having to edit httpd.conf.

--
Be a Good Netizen - Read, Know & Complain About Overly Restrictive Tyrannical ISP ToS & AUP »comcast.net/terms/ »verizon.net/policies/
Say Thanks with a Tool Points Donation


DigitalXeron
There is a lack of sanity

join:2003-12-17
Hamilton, ON

First. Perhaps it may be a good idea to determine if administratively the computer hostname and/or domain should be changing this often and if so, why. If it does perhaps you should investigate changing your naming conventions (e.g. rather than say srv-floor2-rack3 which may have the server relocated, change to appserver1, a functional name).

Changing resources like this can quickly render links and URLs inoperative if you change your infrastructure like this too often (it may have an added effect of irritating users if a front end webserver)

If you truly are determined on this sort of setup, perhaps set up an automated script that generates the apache vhost block into a file, then use an include directive in the main config to point to that generated file.
--
--Kradorex Xeron
[an error occurred while processing this signature]



NOYB
St. John 3.16
Premium
join:2005-12-15
Forest Grove, OR
kudos:1

Thanks for your reply.
The items of concern you raise are not applicable.


Monday, 04-Jun 07:51:00 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 12.5 years online © 1999-2012 dslreports.com.
Most commented news this week
Hot Topics