Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Apapche dynamic vhosts - document_root ??
September 3, 2004, 11:37 pm
rate this thread
I am using $_SERVER['DOCUMENT_ROOT'] in the sites I am working on, which, as
you may have guessed isnt giving me the full path of the vhosts web root
folder (Its returning the value as set in my main apache conf file as it
Is there a way to get the full path to the web root folder from php or have
the value for document_root automatically munged by apache ?
#Simple dynamic virtual hosts
# This extract from apache2.conf implements the virtual host arrangement
# outlined at http://www.apache.org/docs/vhosts/mass.html , using
# get the server name from the Host: header
# this log format can be split per-virtual-host based on the first field
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
CustomLog logs/access_log vcommon
# include the server name in the filenames used to satisfy requests
Re: Apapche dynamic vhosts - document_root ??
That works fine, but not in the context in which am using server
document_root - I really really dont want to have to hard code value for
document_root into my project as its being developed in several locations.
But on the same note, I really want dynamic virtual hosts - its such a
simple hassle free soloution