Hi,
Hopefully its ok to ask this question here, as I'm running out of ideas! First of all, I have 2 sites on my dedicated server - both I would like to run under mod_perl. The server is Apache2, is that helps.
Now - if I just have one site under mod_perl, all works fine. As soon as I add the 2nd one - I start seeing content from the other site "leaking" into the other site!
My configs are pretty much the same (just the path + userid + domain are changed):
<VirtualHost 123.123.123.123:80>
ServerName domain.com
ServerAlias www.domain.com
DocumentRoot /home/fatpeter/public_html
ServerAdmin webmaster@domain.com
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/domain.com combined
CustomLog /usr/local/apache/domlogs/domain.com-bytes_log "%{%s}t %
+I .\n%{%s}t %O ."
ErrorLog /home/fatpeter/error_log
## User fatpeter # Needed for Cpanel::ApacheConf
UserDir enabled fatpeter
<IfModule mod_suphp.c>
suPHP_UserGroup fatpeter fatpeter
</IfModule>
<IfModule !mod_disable_suexec.c>
<IfModule !mod_ruid2.c>
SuexecUserGroup fatpeter fatpeter
</IfModule>
</IfModule>
<IfModule mod_ruid2.c>
RUidGid fatpeter fatpeter
</IfModule>
ScriptAlias /cgi-bin/ /home/fatpeter/public_html/cgi-bin/
PerlRequire /home/fatpeter/startup.pl
PerlModule Apache2::Reload
PerlInitHandler Apache2::Reload
PerlModule Apache2::RequestRec
<Directory /home/fatpeter/public_html/cgi-bin>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
PerlOptions +SetupEnv
Options +ExecCGI
</Directory>
<Directory /home/fatpeter/public_html/cgi-bin/links/admin>
SetHandler cgi-script
</Directory>
# We dont wanna run this in mod_perl!
<Files suggest.cgi>
SetHandler cgi-script
</Files>
<Files community.cgi>
SetHandler cgi-script
</Files>
<Files nph-build-custom.cgi>
SetHandler cgi-script
</Files>
<Files admin.cgi>
SetHandler cgi-script
</Files>
</VirtualHost>
Now, as I said - that works fine with just one domain. As soon as I add the 2nd one, I start to see variables being passed along wrong (incorrect image URLs, etc)
The only thing I can think of - is that we use the same module names... ie
Domain 1:
/cgi-bin/foo/admin/lib/Plugins/Utils.pm
Domain 2:
/cgi-bin/bar/admin/lib/Plugins/Utils.pm
Notice the folder names are different, but they would both translate as Plugins::Utils.
Now, the question is - how can I stop this "sharing" happening? The accounts are totally separate users, and shouldn't be sharing anything (if you try and change another accounts file, you get a permissions error.. which is totally how it should be)
Any suggestions? Its driving me up the wall only being able to run 1 site under mod_perl, without these undesired effects :/
TIA!
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.