Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mod_perl "sharing" wrong files in cache???

Status
Not open for further replies.

youradds

Programmer
Jun 27, 2001
817
GB
Hi,

I've got a REALLY annoying issue here. Basically, I have 2 sites (very similar setups, but different domains and different content). Here is my setup (this is using a WHMS, with cPanel... so I have to edit the pre_virtualhost_global.conf file, so my changes dont get overwritten);

Code:
<VirtualHost 207.58.185.161:80>
    ServerName domain1.com
    ServerAlias [URL unfurl="true"]www.domain1.com[/URL]
    DocumentRoot /home/user1/public_html
    ServerAdmin webmaster@domain1.com
    UseCanonicalName Off
    CustomLog /usr/local/apache/domlogs/domain1.com combined
    CustomLog /usr/local/apache/domlogs/domain1.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    ErrorLog /home/user1/error_log
    ## User user1 # Needed for Cpanel::ApacheConf
    UserDir enabled user1
    <IfModule mod_suphp.c>
        suPHP_UserGroup user1 user1
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        <IfModule !mod_ruid2.c>
            SuexecUserGroup user1 user1
        </IfModule>
    </IfModule>
    <IfModule mod_ruid2.c>
        RUidGid user1 user1
    </IfModule>

    PerlRequire /home/user1/startup.pl    
    PerlModule Apache2::Reload
    PerlInitHandler Apache2::Reload
    PerlModule Apache2::RequestRec
    
    ScriptAlias /cgi-bin/ /home/user1/public_html/cgi-bin/ 

    <Directory /home/user1/public_html/cgi-bin>
            SetHandler perl-script
            PerlResponseHandler ModPerl::Registry
            PerlOptions +ParseHeaders
            PerlOptions +SetupEnv
            Options +ExecCGI
    </Directory>
    
</VirtualHost>


<VirtualHost 64.131.75.118:80>
    ServerName domain2.com
    ServerAlias [URL unfurl="true"]www.domain2.com[/URL]
    DocumentRoot /home/user2/public_html
    ServerAdmin webmaster@domain2.com
    UseCanonicalName Off
    CustomLog /usr/local/apache/domlogs/domain2.com combined
    CustomLog /usr/local/apache/domlogs/domain2.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    ErrorLog /home/user2/error_log

    ## User user2 # Needed for Cpanel::ApacheConf
    UserDir enabled user2
    <IfModule mod_suphp.c>
        suPHP_UserGroup user2 user2
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        <IfModule !mod_ruid2.c>
            SuexecUserGroup user2 user2
        </IfModule>
    </IfModule>
    <IfModule mod_ruid2.c>
        RUidGid user2 user2
    </IfModule>
    ScriptAlias /cgi-bin/ /home/user2/public_html/cgi-bin/ 

    PerlRequire /home/user2/startup.pl    
    PerlModule Apache2::Reload
    PerlInitHandler Apache2::Reload
    PerlModule Apache2::RequestRec
    
    <Directory /home/user2/public_html/cgi-bin>
            SetHandler perl-script
            PerlResponseHandler ModPerl::Registry
            PerlOptions +ParseHeaders
            PerlOptions +SetupEnv
            Options +ExecCGI
    </Directory>

</VirtualHost>

The above config works fine when you have one or the other. If you have both of them however, it seems to get confused. I start seeing references to images from the other sites CDN (programatically added in), which leads me to think that either variables (or whole modules) are being shared across the sites (when they shouldn't be)

What am I doing wrong? I don't really wanna have to get a whole new server, just so I can run mod_perl on this site :/

TIA

Andy
 
No one got anything to say on this? Its killing my server having to disable mod_perl on the 2nd site (due to this weird caching)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top