You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jason Younker <do...@hotmail.com> on 2005/04/21 19:08:20 UTC

[users@httpd] Vhosts not working like expected

I have a home setup running apache 1.3, mod_perl 1.29 & mason 1.26. All was
happy until a few nights ago when I changed up httpd.conf to use named based
virtual hosts. The good news is that it works (works being that apache will
serve any of the 3 sites given a set of circumstances). The problem is this,
and hang in there with me while I explain: I have 3 sites which I will refer
to as site.one, site.two and site.three. If I restart everything, I get a
properly displayed site.one, but site.two shows a blank page and site.three
displays a mason error saying it cannot find a mandatory method (this method
*is* in the appropriate index.html file, it just seems it cannot be found). 
I look at
the logs and nothing odd shows up for two and three, it just appears that
the files cannot be read. So, I go in, open the index page for size two, put
in a new line, save it and refresh my site.two browser page (tested in both
firefix and netscape7.2 on rhel3); it works!
However, now I go back to site one, which previously displayed properly, and
now it is a totally blank page exactly like site two was before I made the
small edit. I edit site.three's index (again by placing an simple newline 
and saving)
and now site three displays properly and site one and two are showing blank
pages. In short, I can only view one site at a time b/c the only page that
will now display is the last modified file.

Of note here is that for site.three, there is a syshandler in the doc root
which defines some things, among them a mandatory method for any .html page.
If I do not have this method in a file, it will die saying something like
"cannot find method....". My point is that if I modify site.one, I then get
a mason error for site.three's home page. This means that it can read the
syshandler for site.three, but not the index.html file. At least that is
what I have gleaned from beating my head against this wall.

[ reply from another list posting ]
>is it a mason problem- i.e., can you see a nonmason 'hello world'
>page?

well, this is interesting. Here is what I did to answer your question:

First, I created a strictly html test.html page in the root of each site. As
I created each page, I opened a new tab and verified that it showed
correctly. The output of the test page was "<SiteX> Test Page" where SiteX
is one, two or three. Note, for site three (the one which, due to the
overall design, must have a specific method in the file) I included the
following: <%flags> inherit => undef </%flags>

Next, I went back to each tab and refreshed (w/o using any cache of course),
and all 3 showed content (as where before two of the three would be blank).
However, the content was the exact same for all 3, that of the final file I
modified. I closed out of all the files, restarted apache, and it persists.

I then did the same thing in reverse (edit site three, two, one) and the
same thing happened, almost. Site two showed the last modified files
contents, and site three threw a mason error (which is what it would do if
reading site one's test file).

So, to answer your question, after that little test, I would maybe have to
say no, it is not a mason problem. It almost appears as though apache is
using the last modified file as the doc root?

[and now I find myself here]

I have tried the general perlhacker types, the mason people and now I submit
this issue to the apache community. I have done a bit of homework on this
so if I have not answered a simple question, please remind me I missed some
important information.

jason



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Vhosts not working like expected

Posted by Jason Younker <do...@hotmail.com>.
Nevermind. I just discovered this a mason problem, not an apache issue. I'll 
head back to one of those lists and try them. Thanks.

>From: "Jason Younker" <do...@hotmail.com>
>Reply-To: users@httpd.apache.org
>To: users@httpd.apache.org
>Subject: Re: [users@httpd] Vhosts not working like expected
>Date: Fri, 22 Apr 2005 17:02:57 -0700
>
>
>ah yes, of course. Here is the vhost section. If there are other parts that 
>are relevant, then that may be my problem (since I don't know about them)
>
>ServerName 127.0.0.1
>NameVirtualHost *
>
><VirtualHost *>
>    ServerName dev.search.com
>    DocumentRoot /websites/search/
>    CustomLog "| /usr/local/apache/bin/rotatelogs 
>/var/output/logs/search/access/%Y-%m-%d 86400" common env=!local_referrer
>    CustomLog "| /usr/local/apache/bin/rotatelogs 
>/var/output/logs/search/referer/%Y-%m-%d 86400" referer env=!local_referrer
>    CustomLog "| /usr/local/apache/bin/rotatelogs 
>/var/output/logs/search/agent_log/%Y-%m-%d 86400" agent
>
>    AddType image/x-icon .ico
>    <Files favicon.ico>
>        ErrorDocument 404 /icons/favicon.ico
>    </Files>
></VirtualHost>
>
><VirtualHost *>
>    ServerName dev.coin.com
>    DocumentRoot /websites/coin/
>    CustomLog "| /usr/local/apache/bin/rotatelogs 
>/var/output/logs/coin/access/%Y-%m-%d 86400" common env=!local_referrer
>    CustomLog "| /usr/local/apache/bin/rotatelogs 
>/var/output/logs/coin/referer/%Y-%m-%d 86400" referer env=!local_referrer
>    CustomLog "| /usr/local/apache/bin/rotatelogs 
>/var/output/logs/coin/agent_log/%Y-%m-%d 86400" agent
>
>    AddType image/x-icon .ico
>    <Files favicon.ico>
>        ErrorDocument 404 /icons/favicon.ico
>    </Files>
></virtualHost>
>
><VirtualHost *>
>    ServerName dev.holeys.com
>    DocumentRoot /websites/holeys/
>    CustomLog "| /usr/local/apache/bin/rotatelogs 
>/var/output/logs/holeys/access/%Y-%m-%d 86400" common env=!local_referrer
>    CustomLog "| /usr/local/apache/bin/rotatelogs 
>/var/output/logs/holeys/referer/%Y-%m-%d 86400" referer env=!local_referrer
>    CustomLog "| /usr/local/apache/bin/rotatelogs 
>/var/output/logs/holeys/agent_log/%Y-%m-%d 86400" agent
>
>    AddType image/x-icon .ico
>    <Files favicon.ico>
>        ErrorDocument 404 /icons/favicon.ico
>    </Files>
></virtualHost>
>
><VirtualHost *>
>    ServerName dev.templates.com
>    DocumentRoot /websites/templates/
></virtualHost>
>
>
>>From: "Brian Hughes '89" <br...@Alum.Dartmouth.ORG>
>>Reply-To: users@httpd.apache.org
>>To: users@httpd.apache.org
>>Subject: Re: [users@httpd] Vhosts not working like expected
>>Date: Thu, 21 Apr 2005 14:14:15 -0400
>>
>>
>>I guess I'll jump on the boilerplate bandwagon...
>>
>>Please post the relevant parts of your httpd.conf file to the list. 
>>Without seeing your vhost setup, no one here will be able to help you out 
>>with your problem. Which sounds pretty whacked, IMO. :)
>>
>>-Brian
>>
>>
>>On Apr 21, 2005, at 01:08 PM, Jason Younker wrote:
>>>I have a home setup running apache 1.3, mod_perl 1.29 & mason 1.26. All 
>>>was
>>>happy until a few nights ago when I changed up httpd.conf to use named 
>>>based
>>>virtual hosts. The good news is that it works (works being that apache 
>>>will
>>>serve any of the 3 sites given a set of circumstances). The problem is 
>>>this,
>>>and hang in there with me while I explain: I have 3 sites which I will 
>>>refer
>>>to as site.one, site.two and site.three. If I restart everything, I get a
>>>properly displayed site.one, but site.two shows a blank page and 
>>>site.three
>>>displays a mason error saying it cannot find a mandatory method (this 
>>>method
>>>*is* in the appropriate index.html file, it just seems it cannot be 
>>>found). I look at
>>>the logs and nothing odd shows up for two and three, it just appears that
>>>the files cannot be read. So, I go in, open the index page for size two, 
>>>put
>>>in a new line, save it and refresh my site.two browser page (tested in 
>>>both
>>>firefix and netscape7.2 on rhel3); it works!
>>>However, now I go back to site one, which previously displayed properly, 
>>>and
>>>now it is a totally blank page exactly like site two was before I made 
>>>the
>>>small edit. I edit site.three's index (again by placing an simple newline 
>>>and saving)
>>>and now site three displays properly and site one and two are showing 
>>>blank
>>>pages. In short, I can only view one site at a time b/c the only page 
>>>that
>>>will now display is the last modified file.
>>>
>>>Of note here is that for site.three, there is a syshandler in the doc 
>>>root
>>>which defines some things, among them a mandatory method for any .html 
>>>page.
>>>If I do not have this method in a file, it will die saying something like
>>>"cannot find method....". My point is that if I modify site.one, I then 
>>>get
>>>a mason error for site.three's home page. This means that it can read the
>>>syshandler for site.three, but not the index.html file. At least that is
>>>what I have gleaned from beating my head against this wall.
>>>
>>>[ reply from another list posting ]
>>>>is it a mason problem- i.e., can you see a nonmason 'hello world'
>>>>page?
>>>
>>>well, this is interesting. Here is what I did to answer your question:
>>>
>>>First, I created a strictly html test.html page in the root of each site. 
>>>As
>>>I created each page, I opened a new tab and verified that it showed
>>>correctly. The output of the test page was "<SiteX> Test Page" where 
>>>SiteX
>>>is one, two or three. Note, for site three (the one which, due to the
>>>overall design, must have a specific method in the file) I included the
>>>following: <%flags> inherit => undef </%flags>
>>>
>>>Next, I went back to each tab and refreshed (w/o using any cache of 
>>>course),
>>>and all 3 showed content (as where before two of the three would be 
>>>blank).
>>>However, the content was the exact same for all 3, that of the final file 
>>>I
>>>modified. I closed out of all the files, restarted apache, and it 
>>>persists.
>>>
>>>I then did the same thing in reverse (edit site three, two, one) and the
>>>same thing happened, almost. Site two showed the last modified files
>>>contents, and site three threw a mason error (which is what it would do 
>>>if
>>>reading site one's test file).
>>>
>>>So, to answer your question, after that little test, I would maybe have 
>>>to
>>>say no, it is not a mason problem. It almost appears as though apache is
>>>using the last modified file as the doc root?
>>>
>>>[and now I find myself here]
>>>
>>>I have tried the general perlhacker types, the mason people and now I 
>>>submit
>>>this issue to the apache community. I have done a bit of homework on this
>>>so if I have not answered a simple question, please remind me I missed 
>>>some
>>>important information.
>>>
>>>jason
>>
>>
>>---------------------------------------------------------------------
>>The official User-To-User support forum of the Apache HTTP Server Project.
>>See <URL:http://httpd.apache.org/userslist.html> for more info.
>>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>>For additional commands, e-mail: users-help@httpd.apache.org
>>
>
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Vhosts not working like expected

Posted by Jason Younker <do...@hotmail.com>.
ah yes, of course. Here is the vhost section. If there are other parts that 
are relevant, then that may be my problem (since I don't know about them)

ServerName 127.0.0.1
NameVirtualHost *

<VirtualHost *>
    ServerName dev.search.com
    DocumentRoot /websites/search/
    CustomLog "| /usr/local/apache/bin/rotatelogs 
/var/output/logs/search/access/%Y-%m-%d 86400" common env=!local_referrer
    CustomLog "| /usr/local/apache/bin/rotatelogs 
/var/output/logs/search/referer/%Y-%m-%d 86400" referer env=!local_referrer
    CustomLog "| /usr/local/apache/bin/rotatelogs 
/var/output/logs/search/agent_log/%Y-%m-%d 86400" agent

    AddType image/x-icon .ico
    <Files favicon.ico>
        ErrorDocument 404 /icons/favicon.ico
    </Files>
</VirtualHost>

<VirtualHost *>
    ServerName dev.coin.com
    DocumentRoot /websites/coin/
    CustomLog "| /usr/local/apache/bin/rotatelogs 
/var/output/logs/coin/access/%Y-%m-%d 86400" common env=!local_referrer
    CustomLog "| /usr/local/apache/bin/rotatelogs 
/var/output/logs/coin/referer/%Y-%m-%d 86400" referer env=!local_referrer
    CustomLog "| /usr/local/apache/bin/rotatelogs 
/var/output/logs/coin/agent_log/%Y-%m-%d 86400" agent

    AddType image/x-icon .ico
    <Files favicon.ico>
        ErrorDocument 404 /icons/favicon.ico
    </Files>
</virtualHost>

<VirtualHost *>
    ServerName dev.holeys.com
    DocumentRoot /websites/holeys/
    CustomLog "| /usr/local/apache/bin/rotatelogs 
/var/output/logs/holeys/access/%Y-%m-%d 86400" common env=!local_referrer
    CustomLog "| /usr/local/apache/bin/rotatelogs 
/var/output/logs/holeys/referer/%Y-%m-%d 86400" referer env=!local_referrer
    CustomLog "| /usr/local/apache/bin/rotatelogs 
/var/output/logs/holeys/agent_log/%Y-%m-%d 86400" agent

    AddType image/x-icon .ico
    <Files favicon.ico>
        ErrorDocument 404 /icons/favicon.ico
    </Files>
</virtualHost>

<VirtualHost *>
    ServerName dev.templates.com
    DocumentRoot /websites/templates/
</virtualHost>


>From: "Brian Hughes '89" <br...@Alum.Dartmouth.ORG>
>Reply-To: users@httpd.apache.org
>To: users@httpd.apache.org
>Subject: Re: [users@httpd] Vhosts not working like expected
>Date: Thu, 21 Apr 2005 14:14:15 -0400
>
>
>I guess I'll jump on the boilerplate bandwagon...
>
>Please post the relevant parts of your httpd.conf file to the list. Without 
>seeing your vhost setup, no one here will be able to help you out with your 
>problem. Which sounds pretty whacked, IMO. :)
>
>-Brian
>
>
>On Apr 21, 2005, at 01:08 PM, Jason Younker wrote:
>>I have a home setup running apache 1.3, mod_perl 1.29 & mason 1.26. All 
>>was
>>happy until a few nights ago when I changed up httpd.conf to use named 
>>based
>>virtual hosts. The good news is that it works (works being that apache 
>>will
>>serve any of the 3 sites given a set of circumstances). The problem is 
>>this,
>>and hang in there with me while I explain: I have 3 sites which I will 
>>refer
>>to as site.one, site.two and site.three. If I restart everything, I get a
>>properly displayed site.one, but site.two shows a blank page and 
>>site.three
>>displays a mason error saying it cannot find a mandatory method (this 
>>method
>>*is* in the appropriate index.html file, it just seems it cannot be 
>>found). I look at
>>the logs and nothing odd shows up for two and three, it just appears that
>>the files cannot be read. So, I go in, open the index page for size two, 
>>put
>>in a new line, save it and refresh my site.two browser page (tested in 
>>both
>>firefix and netscape7.2 on rhel3); it works!
>>However, now I go back to site one, which previously displayed properly, 
>>and
>>now it is a totally blank page exactly like site two was before I made the
>>small edit. I edit site.three's index (again by placing an simple newline 
>>and saving)
>>and now site three displays properly and site one and two are showing 
>>blank
>>pages. In short, I can only view one site at a time b/c the only page that
>>will now display is the last modified file.
>>
>>Of note here is that for site.three, there is a syshandler in the doc root
>>which defines some things, among them a mandatory method for any .html 
>>page.
>>If I do not have this method in a file, it will die saying something like
>>"cannot find method....". My point is that if I modify site.one, I then 
>>get
>>a mason error for site.three's home page. This means that it can read the
>>syshandler for site.three, but not the index.html file. At least that is
>>what I have gleaned from beating my head against this wall.
>>
>>[ reply from another list posting ]
>>>is it a mason problem- i.e., can you see a nonmason 'hello world'
>>>page?
>>
>>well, this is interesting. Here is what I did to answer your question:
>>
>>First, I created a strictly html test.html page in the root of each site. 
>>As
>>I created each page, I opened a new tab and verified that it showed
>>correctly. The output of the test page was "<SiteX> Test Page" where SiteX
>>is one, two or three. Note, for site three (the one which, due to the
>>overall design, must have a specific method in the file) I included the
>>following: <%flags> inherit => undef </%flags>
>>
>>Next, I went back to each tab and refreshed (w/o using any cache of 
>>course),
>>and all 3 showed content (as where before two of the three would be 
>>blank).
>>However, the content was the exact same for all 3, that of the final file 
>>I
>>modified. I closed out of all the files, restarted apache, and it 
>>persists.
>>
>>I then did the same thing in reverse (edit site three, two, one) and the
>>same thing happened, almost. Site two showed the last modified files
>>contents, and site three threw a mason error (which is what it would do if
>>reading site one's test file).
>>
>>So, to answer your question, after that little test, I would maybe have to
>>say no, it is not a mason problem. It almost appears as though apache is
>>using the last modified file as the doc root?
>>
>>[and now I find myself here]
>>
>>I have tried the general perlhacker types, the mason people and now I 
>>submit
>>this issue to the apache community. I have done a bit of homework on this
>>so if I have not answered a simple question, please remind me I missed 
>>some
>>important information.
>>
>>jason
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Vhosts not working like expected

Posted by Brian Hughes '89 <br...@Alum.Dartmouth.ORG>.
I guess I'll jump on the boilerplate bandwagon...

Please post the relevant parts of your httpd.conf file to the list. 
Without seeing your vhost setup, no one here will be able to help you 
out with your problem. Which sounds pretty whacked, IMO. :)

-Brian


On Apr 21, 2005, at 01:08 PM, Jason Younker wrote:
> I have a home setup running apache 1.3, mod_perl 1.29 & mason 1.26. 
> All was
> happy until a few nights ago when I changed up httpd.conf to use named 
> based
> virtual hosts. The good news is that it works (works being that apache 
> will
> serve any of the 3 sites given a set of circumstances). The problem is 
> this,
> and hang in there with me while I explain: I have 3 sites which I will 
> refer
> to as site.one, site.two and site.three. If I restart everything, I 
> get a
> properly displayed site.one, but site.two shows a blank page and 
> site.three
> displays a mason error saying it cannot find a mandatory method (this 
> method
> *is* in the appropriate index.html file, it just seems it cannot be 
> found). I look at
> the logs and nothing odd shows up for two and three, it just appears 
> that
> the files cannot be read. So, I go in, open the index page for size 
> two, put
> in a new line, save it and refresh my site.two browser page (tested in 
> both
> firefix and netscape7.2 on rhel3); it works!
> However, now I go back to site one, which previously displayed 
> properly, and
> now it is a totally blank page exactly like site two was before I made 
> the
> small edit. I edit site.three's index (again by placing an simple 
> newline and saving)
> and now site three displays properly and site one and two are showing 
> blank
> pages. In short, I can only view one site at a time b/c the only page 
> that
> will now display is the last modified file.
>
> Of note here is that for site.three, there is a syshandler in the doc 
> root
> which defines some things, among them a mandatory method for any .html 
> page.
> If I do not have this method in a file, it will die saying something 
> like
> "cannot find method....". My point is that if I modify site.one, I 
> then get
> a mason error for site.three's home page. This means that it can read 
> the
> syshandler for site.three, but not the index.html file. At least that 
> is
> what I have gleaned from beating my head against this wall.
>
> [ reply from another list posting ]
>> is it a mason problem- i.e., can you see a nonmason 'hello world'
>> page?
>
> well, this is interesting. Here is what I did to answer your question:
>
> First, I created a strictly html test.html page in the root of each 
> site. As
> I created each page, I opened a new tab and verified that it showed
> correctly. The output of the test page was "<SiteX> Test Page" where 
> SiteX
> is one, two or three. Note, for site three (the one which, due to the
> overall design, must have a specific method in the file) I included the
> following: <%flags> inherit => undef </%flags>
>
> Next, I went back to each tab and refreshed (w/o using any cache of 
> course),
> and all 3 showed content (as where before two of the three would be 
> blank).
> However, the content was the exact same for all 3, that of the final 
> file I
> modified. I closed out of all the files, restarted apache, and it 
> persists.
>
> I then did the same thing in reverse (edit site three, two, one) and 
> the
> same thing happened, almost. Site two showed the last modified files
> contents, and site three threw a mason error (which is what it would 
> do if
> reading site one's test file).
>
> So, to answer your question, after that little test, I would maybe 
> have to
> say no, it is not a mason problem. It almost appears as though apache 
> is
> using the last modified file as the doc root?
>
> [and now I find myself here]
>
> I have tried the general perlhacker types, the mason people and now I 
> submit
> this issue to the apache community. I have done a bit of homework on 
> this
> so if I have not answered a simple question, please remind me I missed 
> some
> important information.
>
> jason


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org