You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Tapas Mishra <mi...@gmail.com> on 2010/06/10 11:46:04 UTC

[users@httpd] rewrite rule for mingle

Hi,
 I am using a backend server to serve an application which is running
on apache and another apache which is front end to users coming from
internet.
So the back end server is hidden from outside.

I want if some one types in URL

http://site1.mydomain.com/application
then they be redirected to internal server which is running
/application on port 8080
this application server always does not have /application in URL

If some one types
http://site1.mydomain.com
and not
http://site1.mydomain.com/application
then in both cases they are seeing the same page.
Which should not happen.

Now the problem is I have written a ReWriteRule as following


   <IfModule mod_rewrite.c>
         ReWriteEngine on
         ReWriteRule /application/(.*) - [L]
         RewriteRule ^/(.*) http://site1.mydomain.com:8080/$1 [P,L]
     </IfModule>

/application gives a login screen after some one logs in /application
is not present on the URL of client browser
only http://site1.mydomain.com is present.
What is the problem in above ReWriteRule.

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


Re: [users@httpd] rewrite rule for mingle

Posted by Tapas Mishra <mi...@gmail.com>.
The application server when returns a URL then there is no /mingle in
URL so that might be a problem.
I am not clear as what to do with that.

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


Re: [users@httpd] rewrite rule for mingle

Posted by Tapas Mishra <mi...@gmail.com>.
On Fri, Jun 11, 2010 at 9:01 PM, Tom Evans <te...@googlemail.com> wrote:
> OK, that makes everything clearer.
>
> BTW, you are proxying /mingle/. That final / has meaning, please be
> precise about whether something has a trailing slash or not. Your
> first examples of attempting to access '/mingle/' through the proxy
I am confused with the word proxy in the documents.
> were requesting the URL '/mingle', which is why you got 404s. You did
> later show logs where you had requested it properly, so I could
> understand, but you must use the correct URLs, or things _wont_ work.
>
> OK, so when you go to the proxy and request a mingle URL, the mingle
> server returns this Location header:
> Location: http://site.mydomain.com/profile/login
>
> When you go directly, by specifying the IP address, the mingle server
> returns this Location header:
> Location: http://localhost:8080/profile/login
>
> When this is processed by the proxy, it must be rewritten to this:
> Location: http://site.mydomain.com/mingle/profile/login
>
> so change this line in the configuration:
> ProxyPassReverse /mingle/ http://192.168.1.10:8080/
>
> to this:
> ProxyPassReverse /mingle/ http://site.mydomain.com/
I did  I did get a page when I accessed from my laptop
as  ( I do not have a DNS entry for this)
http://site.mydomain.com/mingle the URL in browser got changed to
http://software.openitup.in/mingle/profile/login

 but CSS and Javascripts were broken and this was not the correct page.

The headers of this instance from my laptop are (I have posted more
headers from all servers)

http://site.mydomain.com/mingle

GET /mingle HTTP/1.1
Host: site.mydomain.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8)
Gecko/2009033100 Ubuntu/9.04 (jaunty) Firefox/3.0.8
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Cookie: SESS440c87567d2953541cb9726c24c2fe5f=dpc7834qqbv8ds8ct7b18129o1;
SESSc7d2ae400a554b03caf14d856186f992=7l2b3etbtgmf15s0scbgg2uke7

HTTP/1.0 302 Moved Temporarily
Date: Fri, 11 Jun 2010 16:19:23 GMT
Server: Jetty(6.1.19)
Content-Type: text/html; charset=utf-8
Cache-Control: no-cache
Location: http://site.mydomain.com/mingle/profile/login
X-Runtime: 80
Set-Cookie: mingle_3_1_session_id=92be88f857dbe501e520b97a75cc2ebb;
path=/; HttpOnly
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 110
X-Cache: MISS from cachingserver
X-Cache-Lookup: MISS from cachingserver:80
Via: 1.0 site.mydomain.com, 1.0 cachingserver:80 (squid/2.6.STABLE6)
Proxy-Connection: keep-alive
----------------------------------------------------------
http://site.mydomain.com/mingle/profile/login

GET /mingle/profile/login HTTP/1.1
Host: site.mydomain.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8)
Gecko/2009033100 Ubuntu/9.04 (jaunty) Firefox/3.0.8
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Cookie: SESS440c87567d2953541cb9726c24c2fe5f=dpc7834qqbv8ds8ct7b18129o1;
SESSc7d2ae400a554b03caf14d856186f992=7l2b3etbtgmf15s0scbgg2uke7;
mingle_3_1_session_id=92be88f857dbe501e520b97a75cc2ebb

HTTP/1.0 404 Not Found
Date: Fri, 11 Jun 2010 16:19:23 GMT
Server: Jetty(6.1.19)
Content-Type: text/html; charset=utf-8
Cache-Control: no-cache
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 1068
X-Cache: MISS from cachingserver
X-Cache-Lookup: MISS from cachingserver:80
Via: 1.0 site.mydomain.com, 1.0 cachingserver:80 (squid/2.6.STABLE6)
Proxy-Connection: close
----------------------------------------------------------
http://site.mydomain.com/javascripts/base_packaged.js?1270057297

GET /javascripts/base_packaged.js?1270057297 HTTP/1.1
Host: site.mydomain.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8)
Gecko/2009033100 Ubuntu/9.04 (jaunty) Firefox/3.0.8
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://site.mydomain.com/mingle/profile/login
Cookie: SESS440c87567d2953541cb9726c24c2fe5f=dpc7834qqbv8ds8ct7b18129o1;
SESSc7d2ae400a554b03caf14d856186f992=7l2b3etbtgmf15s0scbgg2uke7;
mingle_3_1_session_id=92be88f857dbe501e520b97a75cc2ebb

HTTP/1.0 404 Not Found
Date: Fri, 11 Jun 2010 16:19:23 GMT
Server: Apache/2.2.14 (Ubuntu)
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 256
Content-Type: text/html; charset=iso-8859-1
X-Cache: MISS from cachingserver
X-Cache-Lookup: MISS from cachingserver:80
Via: 1.0 site.mydomain.com, 1.0 cachingserver:80 (squid/2.6.STABLE6)
Proxy-Connection: close
----------------------------------------------------------
http://site.mydomain.com/stylesheets/base_packaged.css?1270057297

GET /stylesheets/base_packaged.css?1270057297 HTTP/1.1
Host: site.mydomain.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8)
Gecko/2009033100 Ubuntu/9.04 (jaunty) Firefox/3.0.8
Accept: text/css,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://site.mydomain.com/mingle/profile/login
Cookie: SESS440c87567d2953541cb9726c24c2fe5f=dpc7834qqbv8ds8ct7b18129o1;
SESSc7d2ae400a554b03caf14d856186f992=7l2b3etbtgmf15s0scbgg2uke7;
mingle_3_1_session_id=92be88f857dbe501e520b97a75cc2ebb

HTTP/1.0 404 Not Found
Date: Fri, 11 Jun 2010 16:19:24 GMT
Server: Apache/2.2.14 (Ubuntu)
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 255
Content-Type: text/html; charset=iso-8859-1
X-Cache: MISS from cachingserver
X-Cache-Lookup: MISS from cachingserver:80
Via: 1.0 site.mydomain.com, 1.0 cachingserver:80 (squid/2.6.STABLE6)
Proxy-Connection: close
----------------------------------------------------------
http://site.mydomain.com/images/mingle-logo.png?1270057297

GET /images/mingle-logo.png?1270057297 HTTP/1.1
Host: site.mydomain.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8)
Gecko/2009033100 Ubuntu/9.04 (jaunty) Firefox/3.0.8
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://site.mydomain.com/mingle/profile/login
Cookie: SESS440c87567d2953541cb9726c24c2fe5f=dpc7834qqbv8ds8ct7b18129o1;
SESSc7d2ae400a554b03caf14d856186f992=7l2b3etbtgmf15s0scbgg2uke7;
mingle_3_1_session_id=92be88f857dbe501e520b97a75cc2ebb

HTTP/1.0 404 Not Found
Date: Fri, 11 Jun 2010 16:19:24 GMT
Server: Apache/2.2.14 (Ubuntu)
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 253
Content-Type: text/html; charset=iso-8859-1
X-Cache: MISS from cachingserver
X-Cache-Lookup: MISS from cachingserver:80
Via: 1.0 site.mydomain.com, 1.0 cachingserver:80 (squid/2.6.STABLE6)
Proxy-Connection: close
----------------------------------------------------------
http://site.mydomain.com/mingle.ico?1270057297

GET /mingle.ico?1270057297 HTTP/1.1
Host: site.mydomain.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8)
Gecko/2009033100 Ubuntu/9.04 (jaunty) Firefox/3.0.8
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Cookie: SESS440c87567d2953541cb9726c24c2fe5f=dpc7834qqbv8ds8ct7b18129o1;
SESSc7d2ae400a554b03caf14d856186f992=7l2b3etbtgmf15s0scbgg2uke7;
mingle_3_1_session_id=92be88f857dbe501e520b97a75cc2ebb

HTTP/1.0 404 Not Found
Date: Fri, 11 Jun 2010 16:19:27 GMT
Server: Apache/2.2.14 (Ubuntu)
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 244
Content-Type: text/html; charset=iso-8859-1
X-Cache: MISS from cachingserver
X-Cache-Lookup: MISS from cachingserver:80
Via: 1.0 site.mydomain.com, 1.0 cachingserver:80 (squid/2.6.STABLE6)
Proxy-Connection: close
----------------------------------------------------------

When I accessed from the Proxy Server where these tests were done I
got a 404 not found.

Here are the headers on Proxy Server after I did experiment as you suggested.

http://site.mydomain.com/mingle

GET /mingle HTTP/1.1
Host: site.mydomain.com
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Cookie: SESS440c87567d2953541cb9726c24c2fe5f=tdn7dej7oh2mnak8cj9k4jc532

HTTP/1.1 404 Not Found
Date: Fri, 11 Jun 2010 16:13:38 GMT
Server: Apache/2.2.14 (Ubuntu)
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 241
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
----------------------------------------------------------


And here are the headers when site was accessed locally on that PC
where it is hosted.

although I did not do any changes on where mingle is hosted but still
posting if it can give some clue.

http://localhost:8080/

GET / HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive

HTTP/1.1 302 Found
Content-Type: text/html; charset=utf-8
Set-Cookie: mingle_3_1_session_id=0c2d5039406a3b81568d55e544a5a13d;
path=/; HttpOnly
Cache-Control: no-cache
Location: http://localhost:8080/profile/login
X-Runtime: 86
Content-Length: 101
Server: Jetty(6.1.19)
----------------------------------------------------------
http://localhost:8080/profile/login

GET /profile/login HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Cookie: mingle_3_1_session_id=0c2d5039406a3b81568d55e544a5a13d

HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Set-Cookie: mingle_3_1_session_id=0c2d5039406a3b81568d55e544a5a13d;
path=/; HttpOnly
Cache-Control: no-cache
X-Runtime: 113
Content-Length: 6222
Server: Jetty(6.1.19)
----------------------------------------------------------

and when on the same machine where mingle is hosted I tried to access
it like this

http://site.mydomain.com/mingle

then following were headers

http://site.mydomain.com/mingle

GET /mingle HTTP/1.1
Host: site.mydomain.com
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive

HTTP/1.1 404 Not Found
Date: Fri, 11 Jun 2010 16:37:46 GMT
Server: Apache/2.2.14 (Ubuntu)
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 241
Keep-Alive: timeout=15, max=98
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
----------------------------------------------------------






> ProxyPassReverse roughly means this:
> For each appropriate header, search for the second argument in the
> value, and if found, replace with the first argument and reconstruct
> the protocol, host and port according to the host headers/vhost name.
Okay thanks for clearing that out.

> Restart apache, and re-do the tests.
Above are the response of re-doing the tests.
Let me know if any thing else need to be observed.


-- 
Tapas
http://mightydreams.blogspot.com
http://wiki.xensource.com/xenwiki/Xen_on_4_app_servers

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


Re: [users@httpd] rewrite rule for mingle

Posted by Tom Evans <te...@googlemail.com>.
OK, that makes everything clearer.

BTW, you are proxying /mingle/. That final / has meaning, please be
precise about whether something has a trailing slash or not. Your
first examples of attempting to access '/mingle/' through the proxy
were requesting the URL '/mingle', which is why you got 404s. You did
later show logs where you had requested it properly, so I could
understand, but you must use the correct URLs, or things _wont_ work.

OK, so when you go to the proxy and request a mingle URL, the mingle
server returns this Location header:
Location: http://site.mydomain.com/profile/login

When you go directly, by specifying the IP address, the mingle server
returns this Location header:
Location: http://localhost:8080/profile/login

When this is processed by the proxy, it must be rewritten to this:
Location: http://site.mydomain.com/mingle/profile/login

so change this line in the configuration:
ProxyPassReverse /mingle/ http://192.168.1.10:8080/

to this:
ProxyPassReverse /mingle/ http://site.mydomain.com/

ProxyPassReverse roughly means this:
For each appropriate header, search for the second argument in the
value, and if found, replace with the first argument and reconstruct
the protocol, host and port according to the host headers/vhost name.

Restart apache, and re-do the tests.

Tom

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


Re: [users@httpd] rewrite rule for mingle

Posted by Tapas Mishra <mi...@gmail.com>.
On Fri, Jun 11, 2010 at 5:50 PM, Tom Evans <te...@googlemail.com> wrote:

> HTTP doesn't work on filenames. I need to understand what your sites
> are sending, whether requests are going to the right server, etc etc.

> Since I can't access your servers, and don't know your applications, I
> will have to describe how to debug it in generic terms:
>
> Take one URL on the mingle application. This may be the login page or
> something similar, and for this example it is at
> http://192.168.1.10:8080/login.php .
> We want to present this URL externally at
> http://site.domain.com/mingle/login.php
>
> Go to http://site.domain.com/mingle/login.php
I have a doubt  you mean to say to go to site from server (run firefox
there on server)
 which is redirecting to internal IP where mingle is present.
or from any browser via user from internet

> 1) Does this request appear in the access log of the proxy server?
Yes it does appear.In the form

GET /mingle HTTP/1.0" 302

> 2) Does this request appear in the access log of the mingle server?
Yes.I see my IP logged when I access http://site.mydomain.com/mingle
(see in apache logs and mingle both)
Processing ProjectsController#index (for 192.168.1.12 at 2010-06-11
20:12:13) [GET]

Following are more logs on mingle server

[2010-06-11 20:12:13,321] [btpool0-1] [/] Redirected to
http://site.mydomain.com/profile/login
[2010-06-11 20:12:13,321] [btpool0-1] [/] Filter chain halted as
[:authenticated?] rendered_or_redirected.
 [2010-06-11 20:12:13,322] [btpool0-1] [/] Completed in 82ms (DB: 406)
| 302 Found [http://site.mydomain.com]




> Start tracking responses using something like the livehttpheaders
> plugin for firefox. Is it failing because the browser is being
> redirected to the wrong URL?

>If so, provide the Location headers from
> those redirects so we can see why.

I clicked http://site.mydomain.com
from within LAN where the site is hosted.
Following are the headers captured from my laptop in httplive I have
also posted below headers captured when I accessed the site from
Server A and server where it is hosted scroll down



----------------------------------------------------------

http://site.mydomain.com/profile/login



GET /profile/login HTTP/1.1

Host: site.mydomain.com

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8)
Gecko/2009033100 Ubuntu/9.04 (jaunty) Firefox/3.0.8

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Proxy-Connection: keep-alive

Cookie: SESS440c87567d2953541cb9726c24c2fe5f=dpc7834qqbv8ds8ct7b18129o1;
SESSc7d2ae400a554b03caf14d856186f992=7l2b3etbtgmf15s0scbgg2uke7;
mingle_3_1_session_id=0aea9b863295bcc90c93587ae94db6ae



HTTP/1.0 404 Not Found

Date: Fri, 11 Jun 2010 14:47:37 GMT

Server: Apache/2.2.14 (Ubuntu)

Vary: Accept-Encoding

Content-Encoding: gzip

Content-Length: 245

Content-Type: text/html; charset=iso-8859-1

Age: 136





Via: 1.0 site.mydomain.com, 1.0 cachingserver:80 (squid/2.6.STABLE6)

Proxy-Connection: close

----------------------------------------------------------




The headers captured from Server A where this ProxyPass is configured are

http://site.mydomain.com/mingle



GET /mingle HTTP/1.1

Host: site.mydomain.com

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Cookie: SESS440c87567d2953541cb9726c24c2fe5f=tdn7dej7oh2mnak8cj9k4jc532



HTTP/1.1 404 Not Found

Date: Fri, 11 Jun 2010 14:55:18 GMT

Server: Apache/2.2.14 (Ubuntu)

Vary: Accept-Encoding

Content-Encoding: gzip

Content-Length: 241

Keep-Alive: timeout=15, max=100

Connection: Keep-Alive

Content-Type: text/html; charset=iso-8859-1

----------------------------------------------------------




The headers from 192.168.1.10

when I accessed it via http://site.mydomain.com/mingle


http://site.mydomain.com/mingle



GET /mingle HTTP/1.1

Host: site.mydomain.com

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive



HTTP/1.1 404 Not Found

Date: Fri, 11 Jun 2010 15:03:05 GMT

Server: Apache/2.2.14 (Ubuntu)

Vary: Accept-Encoding

Content-Encoding: gzip

Content-Length: 241

Keep-Alive: timeout=15, max=100

Connection: Keep-Alive

Content-Type: text/html; charset=iso-8859-1

----------------------------------------------------------

http://site.mydomain.com/favicon.ico



GET /favicon.ico HTTP/1.1

Host: site.mydomain.com

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: image/png,image/*;q=0.8,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive



HTTP/1.1 404 Not Found

Date: Fri, 11 Jun 2010 15:03:05 GMT

Server: Apache/2.2.14 (Ubuntu)

Vary: Accept-Encoding

Content-Encoding: gzip

Content-Length: 244

Keep-Alive: timeout=15, max=99

Connection: Keep-Alive

Content-Type: text/html; charset=iso-8859-1

----------------------------------------------------------

http://site.mydomain.com/favicon.ico



GET /favicon.ico HTTP/1.1

Host: site.mydomain.com

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive



HTTP/1.1 404 Not Found

Date: Fri, 11 Jun 2010 15:03:08 GMT

Server: Apache/2.2.14 (Ubuntu)

Vary: Accept-Encoding

Content-Encoding: gzip

Content-Length: 244

Keep-Alive: timeout=15, max=98

Connection: Keep-Alive

Content-Type: text/html; charset=iso-8859-1

----------------------------------------------------------




The headers when I accessed site locally where mingle is hosted
http://localhost:8080 where it is full functional


http://localhost:8080/



GET / HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive



HTTP/1.1 302 Found

Content-Type: text/html; charset=utf-8

Set-Cookie: mingle_3_1_session_id=e244d4f1dbf2f3f44c32b9f2f2726183;
path=/; HttpOnly

Cache-Control: no-cache

Location: http://localhost:8080/profile/login

X-Runtime: 104

Content-Length: 101

Server: Jetty(6.1.19)

----------------------------------------------------------

http://localhost:8080/profile/login



GET /profile/login HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Cookie: mingle_3_1_session_id=e244d4f1dbf2f3f44c32b9f2f2726183



HTTP/1.1 200 OK

Content-Type: text/html; charset=utf-8

Set-Cookie: mingle_3_1_session_id=e244d4f1dbf2f3f44c32b9f2f2726183;
path=/; HttpOnly

Cache-Control: no-cache

X-Runtime: 82

Content-Length: 6222

Server: Jetty(6.1.19)

----------------------------------------------------------

http://localhost:8080/stylesheets/base_packaged.css?1270057297



GET /stylesheets/base_packaged.css?1270057297 HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: text/css,*/*;q=0.1

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Referer: http://localhost:8080/profile/login

Cookie: mingle_3_1_session_id=e244d4f1dbf2f3f44c32b9f2f2726183



HTTP/1.1 200 OK

Content-Type: text/css

Cache-Control: max-age=2592000

Last-Modified: Wed, 31 Mar 2010 17:41:37 GMT

Date: Fri, 11 Jun 2010 20:33:54 IST

Expires: Sun, 11 Jul 2010 20:33:54 IST

Transfer-Encoding: chunked

Server: Jetty(6.1.19)

----------------------------------------------------------

http://localhost:8080/stylesheets/profile_packaged.css?1270057297



GET /stylesheets/profile_packaged.css?1270057297 HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: text/css,*/*;q=0.1

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Referer: http://localhost:8080/profile/login

Cookie: mingle_3_1_session_id=e244d4f1dbf2f3f44c32b9f2f2726183



HTTP/1.1 200 OK

Last-Modified: Wed, 31 Mar 2010 17:41:37 GMT

Cache-Control: max-age=2592000

Date: Fri, 11 Jun 2010 20:33:54 IST

Expires: Sun, 11 Jul 2010 20:33:54 IST

Content-Type: text/css

Content-Length: 1003

Server: Jetty(6.1.19)

----------------------------------------------------------

http://localhost:8080/stylesheets/print_packaged.css?1270057297



GET /stylesheets/print_packaged.css?1270057297 HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: text/css,*/*;q=0.1

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Referer: http://localhost:8080/profile/login

Cookie: mingle_3_1_session_id=e244d4f1dbf2f3f44c32b9f2f2726183



HTTP/1.1 200 OK

Last-Modified: Wed, 31 Mar 2010 17:41:37 GMT

Cache-Control: max-age=2592000

Date: Fri, 11 Jun 2010 20:33:54 IST

Expires: Sun, 11 Jul 2010 20:33:54 IST

Content-Type: text/css

Content-Length: 10296

Server: Jetty(6.1.19)

----------------------------------------------------------

http://localhost:8080/javascripts/base_packaged.js?1270057297



GET /javascripts/base_packaged.js?1270057297 HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: */*

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Referer: http://localhost:8080/profile/login

Cookie: mingle_3_1_session_id=e244d4f1dbf2f3f44c32b9f2f2726183



HTTP/1.1 200 OK

Last-Modified: Wed, 31 Mar 2010 17:41:37 GMT

Cache-Control: max-age=2592000

Date: Fri, 11 Jun 2010 20:33:54 IST

Expires: Sun, 11 Jul 2010 20:33:54 IST

Content-Type: text/js

Transfer-Encoding: chunked

Server: Jetty(6.1.19)

----------------------------------------------------------

http://localhost:8080/images/mingle-logo.png?1270057297



GET /images/mingle-logo.png?1270057297 HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: image/png,image/*;q=0.8,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Referer: http://localhost:8080/profile/login

Cookie: mingle_3_1_session_id=e244d4f1dbf2f3f44c32b9f2f2726183



HTTP/1.1 200 OK

Last-Modified: Wed, 31 Mar 2010 17:41:37 GMT

Cache-Control: max-age=2592000

Date: Fri, 11 Jun 2010 20:33:54 IST

Expires: Sun, 11 Jul 2010 20:33:54 IST

Content-Type: application/octet-stream

Content-Length: 7424

Server: Jetty(6.1.19)

----------------------------------------------------------

http://localhost:8080/images/graphic-dialog-mid.jpg?1270057297



GET /images/graphic-dialog-mid.jpg?1270057297 HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: image/png,image/*;q=0.8,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Referer: http://localhost:8080/profile/login

Cookie: mingle_3_1_session_id=e244d4f1dbf2f3f44c32b9f2f2726183



HTTP/1.1 200 OK

Content-Type: image/jpeg

Cache-Control: max-age=2592000

Last-Modified: Wed, 31 Mar 2010 17:41:37 GMT

Date: Fri, 11 Jun 2010 20:33:54 IST

Expires: Sun, 11 Jul 2010 20:33:54 IST

Content-Length: 14667

Server: Jetty(6.1.19)

----------------------------------------------------------

http://localhost:8080/images/graphic-dialog-left.png?1270057297



GET /images/graphic-dialog-left.png?1270057297 HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: image/png,image/*;q=0.8,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Referer: http://localhost:8080/profile/login

Cookie: mingle_3_1_session_id=e244d4f1dbf2f3f44c32b9f2f2726183



HTTP/1.1 200 OK

Last-Modified: Wed, 31 Mar 2010 17:41:37 GMT

Cache-Control: max-age=2592000

Date: Fri, 11 Jun 2010 20:33:54 IST

Expires: Sun, 11 Jul 2010 20:33:54 IST

Content-Type: application/octet-stream

Content-Length: 750

Server: Jetty(6.1.19)

----------------------------------------------------------

http://localhost:8080/images/ajax-spinner-big.gif?1270057297



GET /images/ajax-spinner-big.gif?1270057297 HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: image/png,image/*;q=0.8,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Referer: http://localhost:8080/profile/login

Cookie: mingle_3_1_session_id=e244d4f1dbf2f3f44c32b9f2f2726183



HTTP/1.1 200 OK

Last-Modified: Wed, 31 Mar 2010 17:41:37 GMT

Cache-Control: max-age=2592000

Date: Fri, 11 Jun 2010 20:33:54 IST

Expires: Sun, 11 Jul 2010 20:33:54 IST

Content-Type: image/gif

Content-Length: 6820

Server: Jetty(6.1.19)

----------------------------------------------------------

http://localhost:8080/images/tws_hdbg.gif



GET /images/tws_hdbg.gif HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: image/png,image/*;q=0.8,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Referer: http://localhost:8080/stylesheets/base_packaged.css?1270057297

Cookie: mingle_3_1_session_id=e244d4f1dbf2f3f44c32b9f2f2726183



HTTP/1.1 200 OK

Content-Type: image/gif

Cache-Control: max-age=2592000

Last-Modified: Wed, 31 Mar 2010 17:41:37 GMT

Date: Fri, 11 Jun 2010 20:33:54 IST

Expires: Sun, 11 Jul 2010 20:33:54 IST

Content-Length: 107

Server: Jetty(6.1.19)

----------------------------------------------------------

http://localhost:8080/images/header-tws-back.png



GET /images/header-tws-back.png HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: image/png,image/*;q=0.8,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Referer: http://localhost:8080/stylesheets/base_packaged.css?1270057297

Cookie: mingle_3_1_session_id=e244d4f1dbf2f3f44c32b9f2f2726183



HTTP/1.1 200 OK

Last-Modified: Wed, 31 Mar 2010 17:41:37 GMT

Cache-Control: max-age=2592000

Date: Fri, 11 Jun 2010 20:33:54 IST

Expires: Sun, 11 Jul 2010 20:33:54 IST

Content-Type: application/octet-stream

Content-Length: 239

Server: Jetty(6.1.19)

----------------------------------------------------------

http://localhost:8080/images/std-main-back.png



GET /images/std-main-back.png HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: image/png,image/*;q=0.8,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Referer: http://localhost:8080/stylesheets/base_packaged.css?1270057297

Cookie: mingle_3_1_session_id=e244d4f1dbf2f3f44c32b9f2f2726183



HTTP/1.1 200 OK

Last-Modified: Wed, 31 Mar 2010 17:41:37 GMT

Cache-Control: max-age=2592000

Date: Fri, 11 Jun 2010 20:33:54 IST

Expires: Sun, 11 Jul 2010 20:33:54 IST

Content-Type: application/octet-stream

Content-Length: 218

Server: Jetty(6.1.19)

----------------------------------------------------------

http://localhost:8080/images/graphic-dialog-right.png



GET /images/graphic-dialog-right.png HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: image/png,image/*;q=0.8,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Referer: http://localhost:8080/stylesheets/profile_packaged.css?1270057297

Cookie: mingle_3_1_session_id=e244d4f1dbf2f3f44c32b9f2f2726183



HTTP/1.1 200 OK

Last-Modified: Wed, 31 Mar 2010 17:41:37 GMT

Cache-Control: max-age=2592000

Date: Fri, 11 Jun 2010 20:33:54 IST

Expires: Sun, 11 Jul 2010 20:33:54 IST

Content-Type: application/octet-stream

Content-Length: 12109

Server: Jetty(6.1.19)

----------------------------------------------------------

http://localhost:8080/images/icon-page-help.gif



GET /images/icon-page-help.gif HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: image/png,image/*;q=0.8,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Referer: http://localhost:8080/stylesheets/base_packaged.css?1270057297

Cookie: mingle_3_1_session_id=e244d4f1dbf2f3f44c32b9f2f2726183



HTTP/1.1 200 OK

Content-Type: image/gif

Cache-Control: max-age=2592000

Last-Modified: Wed, 31 Mar 2010 17:41:37 GMT

Date: Fri, 11 Jun 2010 20:33:54 IST

Expires: Sun, 11 Jul 2010 20:33:54 IST

Content-Length: 168

Server: Jetty(6.1.19)

----------------------------------------------------------

http://localhost:8080/mingle.ico?1270057297



GET /mingle.ico?1270057297 HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

Accept: image/png,image/*;q=0.8,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Cookie: mingle_3_1_session_id=e244d4f1dbf2f3f44c32b9f2f2726183



HTTP/1.1 200 OK

Last-Modified: Wed, 31 Mar 2010 17:41:37 GMT

Cache-Control: max-age=2592000

Date: Fri, 11 Jun 2010 20:33:54 IST

Expires: Sun, 11 Jul 2010 20:33:54 IST

Content-Type: application/octet-stream

Content-Length: 1150

Server: Jetty(6.1.19)

----------------------------------------------------------




Location headers I did read this wikipedia page
http://en.wikipedia.org/wiki/HTTP_location
which one in above are Location Headers
if not let me know how to capture.



-- 
Tapas
http://mightydreams.blogspot.com
http://wiki.xensource.com/xenwiki/Xen_on_4_app_servers

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


Re: [users@httpd] rewrite rule for mingle

Posted by Tom Evans <te...@googlemail.com>.
On Fri, Jun 11, 2010 at 12:18 PM, Tapas Mishra <mi...@gmail.com> wrote:
>
> Does this give some clue?

Not really.

HTTP doesn't work on filenames. I need to understand what your sites
are sending, whether requests are going to the right server, etc etc.

Since I can't access your servers, and don't know your applications, I
will have to describe how to debug it in generic terms:

Take one URL on the mingle application. This may be the login page or
something similar, and for this example it is at
http://192.168.1.10:8080/login.php .
We want to present this URL externally at
http://site.domain.com/mingle/login.php

Go to http://site.domain.com/mingle/login.php

1) Does this request appear in the access log of the proxy server?
2) Does this request appear in the access log of the mingle server?

Describe what happens - do not say 'it doesnt work', say precisely
what happens.
Start tracking responses using something like the livehttpheaders
plugin for firefox. Is it failing because the browser is being
redirected to the wrong URL? If so, provide the Location headers from
those redirects so we can see why.

Cheers

Tom

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


Re: [users@httpd] rewrite rule for mingle

Posted by Tapas Mishra <mi...@gmail.com>.
On Fri, Jun 11, 2010 at 4:08 PM, Tom Evans <te...@googlemail.com> wrote:
> On Fri, Jun 11, 2010 at 11:30 AM, Tapas Mishra <mi...@gmail.com> wrote:
>> So let me know what you want to know.
>
>
> Does this not work for you?
No

> <VirtualHost *:80 >
>   ServerName site1.mydomain.com
>   ServerAdmin webmaster@localhost
>
>   ProxyRequests off
>   <Proxy *>
>       Order deny,allow
>       Allow from all
>   </Proxy>
>   ProxyPreserveHost On
>   ProxyPass /mingle/ http://192.168.1.10:8080/
>   ProxyPass / http://192.168.1.10/
>   ProxyPassReverse /mingle/ http://192.168.1.10:8080/
>
>   ErrorLog /var/log/apache2/site1.mydomain.com_error.log
>
>   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>
>
> If not, why not?
Well I do not know the exact reason.After your previous message I have
tried to log more messages

I added the following line to my vhost definition

 CustomLog /var/log/apache2/site-resp_log resp

 LogFormat "%f %p (redirected request)%>s  %U %v" resp


 (filename requested)proxy:http://site.mydomain.com/profile/login
(Canonical port serving request)80 (redirected request)404  (URL
requested )/profile/login

these are the the logged message in site-resp_log
and they are clearly wrong.
In fact the request internally should go i.e.

filename requeste above should be http://site.mydomain.com:8080  (This
should be taken care by my reverse proxy user should not type)

 URL requested :8080/profile/login


Does this give some clue?

-- 
Tapas
http://mightydreams.blogspot.com
http://wiki.xensource.com/xenwiki/Xen_on_4_app_servers

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


Re: [users@httpd] rewrite rule for mingle

Posted by Tom Evans <te...@googlemail.com>.
On Fri, Jun 11, 2010 at 11:30 AM, Tapas Mishra <mi...@gmail.com> wrote:
> So let me know what you want to know.


Does this not work for you?

<VirtualHost *:80 >
   ServerName site1.mydomain.com
   ServerAdmin webmaster@localhost

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

   ErrorLog /var/log/apache2/site1.mydomain.com_error.log

   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>

If not, why not?

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


Re: [users@httpd] rewrite rule for mingle

Posted by Tapas Mishra <mi...@gmail.com>.
On Fri, Jun 11, 2010 at 2:10 PM, Tom Evans <te...@googlemail.com> wrote:
> On Fri, Jun 11, 2010 at 8:44 AM, Tapas Mishra <mi...@gmail.com> wrote:
>> On Thu, Jun 10, 2010 at 7:04 PM, Tom Evans <te...@googlemail.com> wrote:
>>> Then your vhost should look like this:
>>>
>>> <VirtualHost *:80 >
>>>    ServerName site1.mydomain.com
>>>    ServerAdmin webmaster@localhost
>>>
>>>    ProxyRequests off
>>>    <Proxy *>
>>>        Order deny,allow
>>>        Allow from all
>>>    </Proxy>
>>>    ProxyPreserveHost On
>>>    ProxyPass /mingle/ http://192.168.1.10:8080/
>>>    ProxyPass / http://192.168.1.10/
>>>    ProxyPassReverse /mingle/ http://192.168.1.10:8080/
>>>
>> Okay I checked the above rules exactly but http://site1.mydomain.com/mingle
>> could not be served on internet.
>>
>
> Error message or it never happened.
Yes you are right it never happened.

> Also:
>
>>> The apache server at 192.168.1.10:8080 is configured to respond to the
>>> host 'site1.mydomain.com'
>> Not at 8080 on 80
>
> Explain. What host is 192.168.1.10:8080 configured to respond to?
I have not configured any thing.
The software I installed its documentation said that if every thing is
working fine then to be able to use it
point
http://<IP where hosted>:8080
and it should work.
So let me know what you want to know.

-- 
Tapas
http://mightydreams.blogspot.com
http://wiki.xensource.com/xenwiki/Xen_on_4_app_servers

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


Re: [users@httpd] rewrite rule for mingle

Posted by Tom Evans <te...@googlemail.com>.
On Fri, Jun 11, 2010 at 8:44 AM, Tapas Mishra <mi...@gmail.com> wrote:
> On Thu, Jun 10, 2010 at 7:04 PM, Tom Evans <te...@googlemail.com> wrote:
>> Then your vhost should look like this:
>>
>> <VirtualHost *:80 >
>>    ServerName site1.mydomain.com
>>    ServerAdmin webmaster@localhost
>>
>>    ProxyRequests off
>>    <Proxy *>
>>        Order deny,allow
>>        Allow from all
>>    </Proxy>
>>    ProxyPreserveHost On
>>    ProxyPass /mingle/ http://192.168.1.10:8080/
>>    ProxyPass / http://192.168.1.10/
>>    ProxyPassReverse /mingle/ http://192.168.1.10:8080/
>>
> Okay I checked the above rules exactly but http://site1.mydomain.com/mingle
> could not be served on internet.
>

Error message or it never happened.

Also:

>> The apache server at 192.168.1.10:8080 is configured to respond to the
>> host 'site1.mydomain.com'
> Not at 8080 on 80

Explain. What host is 192.168.1.10:8080 configured to respond to?

Cheers

Tom

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


Re: [users@httpd] rewrite rule for mingle

Posted by Tapas Mishra <mi...@gmail.com>.
On Thu, Jun 10, 2010 at 7:04 PM, Tom Evans <te...@googlemail.com> wrote:
> Then your vhost should look like this:
>
> <VirtualHost *:80 >
>    ServerName site1.mydomain.com
>    ServerAdmin webmaster@localhost
>
>    ProxyRequests off
>    <Proxy *>
>        Order deny,allow
>        Allow from all
>    </Proxy>
>    ProxyPreserveHost On
>    ProxyPass /mingle/ http://192.168.1.10:8080/
>    ProxyPass / http://192.168.1.10/
>    ProxyPassReverse /mingle/ http://192.168.1.10:8080/
>
Okay I checked the above rules exactly but http://site1.mydomain.com/mingle
could not be served on internet.

-- 
Tapas
http://mightydreams.blogspot.com
http://wiki.xensource.com/xenwiki/Xen_on_4_app_servers

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


Re: [users@httpd] rewrite rule for mingle

Posted by Tapas Mishra <mi...@gmail.com>.
On Thu, Jun 10, 2010 at 7:04 PM, Tom Evans <te...@googlemail.com> wrote:

> The <IfModule mod_rewrite.c> section is not right at all.
>
> Stop me where I get it wrong
>
> site1.mydomain.com is your 'publicly available address' and you want
> your websites on 192.168.1.10 to appear proxied on this domain.
> site1.mydomain.com/mingle/ should proxy to the site at http://192.168.1.10:8080/
> site1.mydomain.com/ should proxy to the site at http://192.168.1.10/
> The apache server at 192.168.1.10 is configured to respond to the host
> 'site1.mydomain.com'

Correct.

> The apache server at 192.168.1.10:8080 is configured to respond to the
> host 'site1.mydomain.com'
Not at 8080 on 80

> Then your vhost should look like this:
Where which vhost should following be present on 192.168.1.10 or
server which is front end.

> <VirtualHost *:80 >
>    ServerName site1.mydomain.com
>    ServerAdmin webmaster@localhost
>
>    ProxyRequests off
>    <Proxy *>
>        Order deny,allow
>        Allow from all
>    </Proxy>
>    ProxyPreserveHost On
>    ProxyPass /mingle/ http://192.168.1.10:8080/
>    ProxyPass / http://192.168.1.10/
>    ProxyPassReverse /mingle/ http://192.168.1.10:8080/
>
>    ErrorLog /var/log/apache2/site1.mydomain.com_error.log
>
>    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>

Okay
> You do not need a ProxyPassReverse for proxying to
> http://192.168.1.10/, as it will generate headers based upon the
> received Host header (or it should).

I could not understand this one.


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


Re: [users@httpd] rewrite rule for mingle

Posted by Tom Evans <te...@googlemail.com>.
On Thu, Jun 10, 2010 at 1:11 PM, Tapas Mishra <mi...@gmail.com> wrote:
> Actually I have got quite confused.
> I will tell from start.
..
> <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>
>

The <IfModule mod_rewrite.c> section is not right at all.

Stop me where I get it wrong

site1.mydomain.com is your 'publicly available address' and you want
your websites on 192.168.1.10 to appear proxied on this domain.
site1.mydomain.com/mingle/ should proxy to the site at http://192.168.1.10:8080/
site1.mydomain.com/ should proxy to the site at http://192.168.1.10/
The apache server at 192.168.1.10 is configured to respond to the host
'site1.mydomain.com'
The apache server at 192.168.1.10:8080 is configured to respond to the
host 'site1.mydomain.com'

Then your vhost should look like this:

<VirtualHost *:80 >
    ServerName site1.mydomain.com
    ServerAdmin webmaster@localhost

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

    ErrorLog /var/log/apache2/site1.mydomain.com_error.log

    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>

You do not need a ProxyPassReverse for proxying to
http://192.168.1.10/, as it will generate headers based upon the
received Host header (or it should).


Cheers

Tom

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


Re: [users@httpd] rewrite rule for mingle

Posted by Tapas Mishra <mi...@gmail.com>.
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


Re: [users@httpd] rewrite rule for mingle

Posted by Eric Covener <co...@gmail.com>.
On Thu, Jun 10, 2010 at 7:43 AM, Tapas Mishra <mi...@gmail.com> wrote:
> On Thu, Jun 10, 2010 at 4:34 PM, Eric Covener <co...@gmail.com> wrote:
>>>
>> Try adding the R flag  on the first RewriteRule.
> Ok it did seem to do some thing.
> Actually the application is not developed by me.When some one types on LAN
> http://192.168.1.10:8080
>
> a welcome screen comes that is of mingle.
> After that it automatically replaces the above url as
>
> http://192.168.1.10:8080/user/profile
>
> In this condition if some one accesses it on internet
>
> http://site1.mydomain.com/application
>
> then he should get a page
>
> which has in URL /application but the contact from backend server
> should be hidden.
>
> This is now the new ReWriteRule
>
>        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 /application/(.*) - [R]
>         RewriteRule ^/application(.*)
> http://site1.mydomain.com:8080/user/profile/$1 [P,L]
>         </IfModule>
>
>
> Any suggestions ?

Don't use overlapping ProxyPass and RewriteRule w/ proxy if you can
avoid it.  Also, Using [R] and not substituting doesn't sound like a
good idea.  Finally, why is there a trailing slash on the
/application/ in the first rule?





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



-- 
Eric Covener
covener@gmail.com

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


Re: [users@httpd] rewrite rule for mingle

Posted by Tapas Mishra <mi...@gmail.com>.
On Thu, Jun 10, 2010 at 4:34 PM, Eric Covener <co...@gmail.com> wrote:
>>
> Try adding the R flag  on the first RewriteRule.
Ok it did seem to do some thing.
Actually the application is not developed by me.When some one types on LAN
http://192.168.1.10:8080

a welcome screen comes that is of mingle.
After that it automatically replaces the above url as

http://192.168.1.10:8080/user/profile

In this condition if some one accesses it on internet

http://site1.mydomain.com/application

then he should get a page

which has in URL /application but the contact from backend server
should be hidden.

This is now the new ReWriteRule

        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 /application/(.*) - [R]
         RewriteRule ^/application(.*)
http://site1.mydomain.com:8080/user/profile/$1 [P,L]
         </IfModule>


Any suggestions ?

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


Re: [users@httpd] rewrite rule for mingle

Posted by Eric Covener <co...@gmail.com>.
>   <IfModule mod_rewrite.c>
>         ReWriteEngine on
>         ReWriteRule /application/(.*) - [L]
>         RewriteRule ^/(.*) http://site1.mydomain.com:8080/$1 [P,L]
>     </IfModule>
>
> /application gives a login screen after some one logs in /application
> is not present on the URL of client browser
> only http://site1.mydomain.com is present.
> What is the problem in above ReWriteRule.
>
Try adding the R flag  on the first RewriteRule.



-- 
Eric Covener
covener@gmail.com

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