ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Trouble with httpd.conf on iseries for virtual hosts

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trouble with httpd.conf on iseries for virtual hosts

    Our company is hosting two websites from the AS400 using php and net.data for most of it. Lets call them CompanyA and CompanyB. CompanyB is rarely accessed but we did notice when it tries calling a php program it is actually grabbling the CompanyA version that is named the same thing.

    I think the problem is with the virtualhost configuration but after digging around trying to educate myself on it I am not so sure. Any help or thoughts would be great. Below I pasted the virtualhost setup for the two companies.
    Code:
    <VirtualHost *:80>                                                         
    ProxyPreserveHost On                                                       
    RewriteEngine on                                                           
    RewriteCond %{REQUEST_FILENAME} ^.+\.php$ [NC]                             
    RewriteRule ^/(.*) http://127.0.0.1:8000/$1 [P]                            
    ProxyPassReverse / [url]http://127.0.0.1:8000/[/url]                                  
    RewriteCond %{REQUEST_METHOD} ^TRACE                                       
    RewriteRule .* - [F]                                                       
       ServerName [url]www.companya.com[/url]                                              
     DirectoryIndex index.htm                                                  
       DocumentRoot /www/webserver/websites/coma                                
       ServerAlias coma.com *.companya.com 
       UserDir public_html                                                     
          <Directory /www/webserver/websites/coma>                              
          Order Allow,Deny                                                     
          Allow From all                                                       
       </Directory>                                                            
       <Directory /qsys.lib/netdata.lib>                                       
          Allow From all                                                       
          Order allow,deny                                            
          Options +ExecCGI                                            
       </Directory>                                                   
       ScriptAlias /cgi-bin/db2www/ /qsys.lib/netdata.lib/db2www.pgm/ 
       Alias /ifs/ /www/webserver/websites/coma/                       
                                                                      
    </VirtualHost>                                                    
    <VirtualHost *:80>                                                
    ProxyPreserveHost On                                              
    RewriteEngine on                                                  
    RewriteCond %{REQUEST_FILENAME} ^.+\.php$ [NC]                    
    RewriteRule ^/(.*) http://127.0.0.1:8000/$1 [P]                   
    ProxyPassReverse / [url]http://127.0.0.1:8000/[/url]                         
    RewriteCond %{REQUEST_METHOD} ^TRACE                              
    RewriteRule .* - [F]                                              
       ServerName [url]www.companyb.com[/url]                        
    DirectoryIndex Welcome.htm                                        
       DocumentRoot /www/webserver/websites/comb                       
       ServerAlias comb.com *.companyb.com
       UserDir public_html                                            
          <Directory /www/webserver/websites/comb>                     
          Order Allow,Deny                                            
          Allow From all                                              
       </Directory>                                                   
       <Directory /qsys.lib/combdata.lib>                              
          Allow From all                                              
          Order allow,deny                                            
          Options +ExecCGI                                            
       </Directory>                                                   
       ScriptAlias /cgi-bin/db2www/ /qsys.lib/combdata.lib/db2www.pgm/ 
       Alias /ifs/ /www/webserver/websites/comb/                       
                                                                      
                                                                      
    </VirtualHost>

  • #2
    Re: Trouble with httpd.conf on iseries for virtual hosts

    is there a question in there somewhere? sheesh...
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: Trouble with httpd.conf on iseries for virtual hosts

      I tried pasting a bunch of info but I can't see it now.

      Comment


      • #4
        Re: Trouble with httpd.conf on iseries for virtual hosts

        perhaps someone will chime in before i can dig this up (it's been a long time since i had to use virtual hosts )
        I'm not anti-social, I just don't like people -Tommy Holden

        Comment


        • #5
          Re: Trouble with httpd.conf on iseries for virtual hosts

          can anybody see my long post with the configuration details? I have tried posting it multiple times but it doesn't show up. Too long perhaps?

          Comment


          • #6
            Re: Trouble with httpd.conf on iseries for virtual hosts

            I don't know why I can't post the details of my issue but here is a link to it. http://www.codingforums.com/showthread.php?t=254677

            Comment


            • #7
              Re: Trouble with httpd.conf on iseries for virtual hosts

              we see the details for every post you made. not sure why you aren't seeing them.
              I'm not anti-social, I just don't like people -Tommy Holden

              Comment


              • #8
                Re: Trouble with httpd.conf on iseries for virtual hosts

                It might be the cold meds but the first thing I see in this thread is Tom answering an un-asked (un-posted?) question

                How does he do that?

                Gls
                The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

                Comment


                • #9
                  Re: Trouble with httpd.conf on iseries for virtual hosts

                  Originally posted by GLS400 View Post
                  It might be the cold meds but the first thing I see in this thread is Tom answering an un-asked (un-posted?) question

                  How does he do that?

                  Gls
                  you can't see the http config info either? added code tags to the OP maybe that'll fix it...
                  I'm not anti-social, I just don't like people -Tommy Holden

                  Comment

                  Working...
                  X