Re: rewrite rule for mingle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux