Forum

httpd.conf file with relative path

Shashank
3 May 2009, 10:56
Hi
I want to give the relative path in the httpd.conf, so that irrespective what the file structure is
i dont have to change the httpd.conf again and again.

i tried giving the following path:
VirtualHost {
Hostname = 10.112.79.199
WebsiteRoot = ../var/www/client
StartFile = login.html
AccessLogfile = ../var/www/log/access.log
ErrorLogfile = ../var/www/log/error.log
ExecuteCGI = yes
TimeForCGI = 5
}

the path given is taking the Hiwatha binary as the start point

the file structure is

hiawatha _____ var/www/client
| |______ etc/hiawatha/httpd.conf
|_________ sbin/hiawatha


but the problem is it is not working .

can u help me??
Hugo Leisink
3 May 2009, 11:52
Relative paths are not possible. But you can use the 'set' configfile option to make things easy.
set START_POINT = /some/directory

VirtualHost {
Hostname = 10.112.79.199
WebsiteRoot = START_POINT/var/www/client
StartFile = login.html
AccessLogfile = START_POINT/var/www/log/access.log
ErrorLogfile = START_POINT/var/www/log/error.log
ExecuteCGI = yes
TimeForCGI = 5
}

Hiawatha does a simple search and replace with the variable name, so be carefull with what you use as the variable name.
Shashank
3 May 2009, 15:06
Thanks boss.!!
This topic has been closed.