httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tapas Mishra <mightydre...@gmail.com>
Subject Re: [users@httpd] rewrite rule for mingle
Date Thu, 10 Jun 2010 12:11:36 GMT
Actually I have got quite confused.
I will tell from start.
I am running a website.
http://site1.mydomain.com
on a pc on LAN.
There is a server which has a public IP.
I have access to modify what ever Apache file is needed.
That server does not have a DNS.


Server A                                     Server B
public IP                                      site1.mydomain.com
mydomain.com                             site1.mydomain.com:8080

192.168.1.2                                  192.168.1.10


Any request coming to site1.mydomain.com comes to
192.168.1.2 above and then there reads the vhost file which has

<VirtualHost *:80 >

        ServerName site1.mydomain.com
        ServerAdmin webmaster@localhost

        ProxyRequests off
        <Proxy *>
        Order deny,allow
        Allow from all
        </Proxy>
        ProxyPass / http://192.168.1.10/
        ProxyPassReverse / http://192.168.1.10/

        <IfModule mod_rewrite.c>
         ReWriteEngine on
         RewriteRule ^/mingle(.*) http://site1.mydomain.com:8080//$1 [R,L]
         </IfModule>
        ErrorLog /var/log/apache2/site1.mydomain.com_error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/site1.mydomain.com_access.log combined
        CustomLog /var/log/apache2/site1.mydomain.com-resp_log resp
        LogFormat "%{X-Forwarded-For}i  %D %t" resp

</VirtualHost>


On Server B 192.168.1.0 I have following vhost

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName site1.mydomain.com
        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>

        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/site1.mydomain.com_access.log combined
        CustomLog /var/log/apache2/site1.mydomain.com-resp_log resp
        LogFormat "%{X-Forwarded-For}i  %D %t" resp

    Alias /doc/ "/usr/share/doc/"
  <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>



This is one helpful link
http://community.thoughtworks.com/posts/1954e8961c
but I could not apply it correctly.



-- 
Tapas

---------------------------------------------------------------------
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


Mime
View raw message