httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Penner <>
Subject [users@httpd] Public Vs. Development (Private) URL to Document: Not Same Document Roots For Absolute URLs of Supporting Documents
Date Mon, 07 Oct 2013 12:12:01 GMT
Apache/2.4.3 (Win32) OpenSSL/0.9.8x PHP/5.4.8

The (Windows) filesystem for my server this Windows path:


The tree under Z:\service.web.opinions is:

   * developing
   * _content
      ++ opinionDocs.js
      ** culture
      ** politics
      ** groups

Note that
   "**" is a directory/folder within the directory/folder "_content"
   "++" is an file in the directory "_content"
   "+++" is a file in the directory "culture"

Finally two more very important bits of information as to the server config:

In my *httpd.conf* file, I have

     Alias /opinion    "Z:/service.web.opinions/_content"

In my *httpd-**vhosts.conf* file, I have:

<VirtualHost *:80 *:8080 *:8008>
    DocumentRoot "Z:/service.web.opinions/_content"
    ErrorLog "|\"C:/_Windows Uninstalled
\"D:/WebServerConfig/httpd/logs/\" 7776000"
    CustomLog "|bin/rotatelogs.exe
D:/WebServerConfig/httpd/logs/ 5M"
combined env=!image-request
    Options Indexes FollowSymLinks

In this configuration, I have an HTML document "elections.html" in the Windows
path Z:\service.web.opinions\_content\culture\elections.html.
This is accessed by the public as ""


I personally/privately (as a developer?) want to access the site content using a
*localhost* or ** url, namely "http://localhost/opinion/"

The document "elections.html" contains the HTML markup:

    <script type="text/javascript" src="/opinionDocs.js"></script>

That JavaScript file is in the path 

The public access is okay, because the DocumentRoot for the public access
"Z:\service.web.opinions\_content\"  and so the "src" attribute points to the
root "/" where opinion docs is located.

But when I use "http://localhost/opinion/culture/elections.html" (or
"",  I will get a 404 Not Found
error.   The error will be that "http://localhost/opinionDocs.js" (or
"") was not found.

Obviously the "Alias" feature is the wrong feature to use, and it should
probably be another <VirtualHost> directive, right?

View raw message