You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "David S." <da...@alumni.tufts.edu> on 2007/01/29 22:49:25 UTC
[users@httpd] virtual host shuffle
I have 3 web mod_python apps running on different ports. It behaves as if it is
mixing up ports. When I hit http://a.server.name/secure/ it redirects correctly
and https://a.server.name/secure/ looks and works fine. Then I try
http://a.server.name:8000/ and again fine. Then I try
https://a.server.name/secure/ again and it appears to be hitting the application
running on port 8000. Refreshing the page sometimes resolves correctly,
sometimes not.
Finally, I would expect that using http://the_pysical_servername/ would not
work, or would consistently go to the default virtual server but it responds as
if I used a.server.name.
I am hugely confused. Any help is greatly appreciated.
Peace, David S.
p.s. I have a configuration that looks like the following:
NameVirtualHost 192.168.0.210:80
<VirtualHost 192.168.0.210:80>
ServerName a.server.name
Redirect permanent /admin/ https://a.server.name/secure/
...
</VirtualHost>
NameVirtualHost 192.168.0.210:443
<VirtualHost 192.168.0.210:443>
ServerName a.server.name
SSLEngine on
...
</VirtualHost>
NameVirtualHost 192.168.0.210:8000
<VirtualHost 192.168.0.210:8000>
ServerName a.server.name
...
</VirtualHost>
---------------------------------------------------------------------
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
[users@httpd] Re: virtual host shuffle
Posted by "David S." <da...@alumni.tufts.edu>.
David S. <davidschein <at> alumni.tufts.edu> writes:
>
> I have 3 web mod_python apps running on different ports. It behaves as if it
> is mixing up ports.
FIXED.
To each virtual host with mod_python add:
PythonInterpreter some_unique_name
The key to my confusion was this snippet:
"... all scripts in the same virtual server execute in the same subinterpreter,
but scripts in different virtual servers execute in different subinterpreters
with completely separate namespaces."
The key to understanding what was happening is this sentence:
"Default behaviour is to name interpreters using the Apache virtual server name
(ServerName directive)."
I have the same ServerName for each virtual host, just different ports. So
mod_python was (it seems) using the same subinterpreter, which resulted in the
seemingly random server responses I got.
references:
http://www.modpython.org/live/current/doc-html/pyapi-interps.html
http://www.modpython.org/live/current/doc-html/dir-other-pi.html
Peace,
David S.
---------------------------------------------------------------------
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