LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-25-2011, 11:18 AM   #1
shaselai
LQ Newbie
 
Registered: Oct 2009
Posts: 12

Rep: Reputation: 0
Question about rewrite rule and proxypass for http-bind and URL


I am trying to setup http-bind and from some virtual hosts i see:
Servername myserver
RewriteRule /http-bind/ http://localhost/index.html [P]
ProxyPass /http-bind http://127.0.0.1:8080/http-bind/

When I go to myserver/http-bind/ I get to see a partially working index.html but the URL on firefox is still myserver/http-bind/ <- is this normal or the address should change into http"127.0.0.1:8080/http-bind/ or http://localhost/index.html ?
 
Old 02-26-2011, 04:48 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,216
Blog Entries: 1

Rep: Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067
Hi,

It's normal. This is how rewrite with the proxy flag [P] works. From apache mod_rewrite documentation:
Quote:
'proxy|P' (force proxy)
This flag forces the substitution part to be internally sent as a proxy request and immediately (rewrite processing stops here) put through the proxy module. You must make sure that the substitution string is a valid URI (typically starting with http://hostname) which can be handled by the Apache proxy module. If not, you will get an error from the proxy module. Use this flag to achieve a more powerful implementation of the ProxyPass directive, to map remote content into the namespace of the local server.

Note: mod_proxy must be enabled in order to use this flag.

Add the trailing slash in the proxied URI and see if index.html works
Code:
ProxyPass /http-bind/ http://127.0.0.1:8080/http-bind/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rewrite rule for url change ravibhure Linux - Server 2 01-21-2010 10:12 PM
URL rewrite rule not working... vikram_cvk Linux - Software 1 12-03-2008 03:14 AM
Apache rewrite rule help - dynamic url to static page DukeLeto Linux - Software 3 11-12-2008 12:26 PM
rewrite rule base url apache2 sinister1 Linux - Software 3 11-23-2007 11:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration