Forum Moderators: phranque
The C: drive has a root directory "websites" and beneath that folder are the names of various web sites.
I.E. the path for the index.html in the mysite website looks like this:
C:/websites/mysite/public_html/index.html
When $_SERVER['DOCUMENT_ROOT'] is used on the local testing server it comes back with:
C:/websites
When the same command is used on the remote server the results show the complete path--so everything is fine there.
I've added the directory in Apache, but the results are the same.
What needs to be adjusted so that $_SERVER['DOCUMENT_ROOT'] will provide the full path as it does on the remote server? Since there are several web site folders beneath the directory "websites" it is important that the result returned be to current site giving the request for $_SERVER['DOCUMENT_ROOT'].
Sorry if I'm not clear.
The httpd.conf file had the following (it has since been remarked out):
#<Directory "C:/websites/mysite/public_html">
# Options FollowSymLinks Indexes MultiViews
# Allow from All
# Order Allow,Deny
# AllowOverride None
#</Directory>
Just in case the conf for websites has a bearing on this I'm including it:
<Directory "C:/websites">
Options FollowSymLinks Indexes MultiViews
Allow from All
Order Allow,Deny
AllowOverride All None FileInfo AuthConfig Limit Indexes Limit Options
AddHandler server-parsed .shtml
</Directory>
Working with the server is about as clear to me as a London Fog.
Whatever change is made it is important that it apply to several different websites (mysite1, mysite2, mysite3, etc.)
Take a look at the Apache document Dynamically configured mass virtual hosting [httpd.apache.org]. I'm not proposing that you actually set up a development server this way (using dynamic vhosts has drawbacks, especially the log-file problem described), but rather, take a look at their first configuration example that shows the non-dynamic virtual host setup. There, you can see the DocumentRoot associated with the ServerName and ScriptAlias.
Jim