Comments (6)
Interesting, can you please provide some traffic dumps so I can reproduce the issue here.
from mod_rpaf.
The setup:
mkdir -p /var/www/domain1 && echo "WRONG" >$_/test.html
mkdir -p /var/www/domain2 && echo "OK" >$_/test.html
<VirtualHost *:80>
ServerName domain1.dev
RewriteEngine On
RewriteLogLevel 9
RewriteLog /var/log/apache2/rewrite.log
RewriteRule /domain2/(.*) http://domain2.dev/$1 [P]
DocumentRoot /var/www/domain1
</VirtualHost>
<VirtualHost *:80>
ServerName domain2.dev
DocumentRoot /var/www/domain2
</VirtualHost>
Test curl http://domain1.dev/domain2/test.html
- with
RPAFsethostname off
:
127.0.0.1 - - [14/Oct/2015:22:45:53 +0200] [domain1.dev/sid#7fdc2cf82c78][rid#7fdc2d953040/initial] (2) init rewrite engine with requested uri /domain2/test.html
127.0.0.1 - - [14/Oct/2015:22:45:53 +0200] [domain1.dev/sid#7fdc2cf82c78][rid#7fdc2d953040/initial] (3) applying pattern '/domain2/(.*)' to uri '/domain2/test.html'
127.0.0.1 - - [14/Oct/2015:22:45:53 +0200] [domain1.dev/sid#7fdc2cf82c78][rid#7fdc2d953040/initial] (2) rewrite '/domain2/test.html' -> 'http://domain2.dev/test.html'
127.0.0.1 - - [14/Oct/2015:22:45:53 +0200] [domain1.dev/sid#7fdc2cf82c78][rid#7fdc2d953040/initial] (2) forcing proxy-throughput with http://domain2.dev/test.html
127.0.0.1 - - [14/Oct/2015:22:45:53 +0200] [domain1.dev/sid#7fdc2cf82c78][rid#7fdc2d953040/initial] (1) go-ahead with proxy request proxy:http://domain2.dev/test.html [OK]
- with
RPAFsethostname on
:
127.0.0.1 - - [14/Oct/2015:22:46:32 +0200] [domain1.dev/sid#7fc5de794c78][rid#7fc5df15f010/initial] (2) init rewrite engine with requested uri /domain2/test.html
127.0.0.1 - - [14/Oct/2015:22:46:32 +0200] [domain1.dev/sid#7fc5de794c78][rid#7fc5df15f010/initial] (3) applying pattern '/domain2/(.*)' to uri '/domain2/test.html'
127.0.0.1 - - [14/Oct/2015:22:46:32 +0200] [domain1.dev/sid#7fc5de794c78][rid#7fc5df15f010/initial] (2) rewrite '/domain2/test.html' -> 'http://domain2.dev/test.html'
127.0.0.1 - - [14/Oct/2015:22:46:32 +0200] [domain1.dev/sid#7fc5de794c78][rid#7fc5df15f010/initial] (2) forcing proxy-throughput with http://domain2.dev/test.html
127.0.0.1 - - [14/Oct/2015:22:46:32 +0200] [domain1.dev/sid#7fc5de794c78][rid#7fc5df15f010/initial] (1) go-ahead with proxy request proxy:http://domain2.dev/test.html [OK]
127.0.0.1 - - [14/Oct/2015:22:46:32 +0200] [domain1.dev/sid#7fc5de794c78][rid#7fc5df15f010/initial] (2) init rewrite engine with requested uri /test.html
127.0.0.1 - - [14/Oct/2015:22:46:32 +0200] [domain1.dev/sid#7fc5de794c78][rid#7fc5df15f010/initial] (3) applying pattern '/domain2/(.*)' to uri '/test.html'
127.0.0.1 - - [14/Oct/2015:22:46:32 +0200] [domain1.dev/sid#7fc5de794c78][rid#7fc5df15f010/initial] (1) pass through /test.html
from mod_rpaf.
Please provide the rpaf comfig also
from mod_rpaf.
<IfModule mod_rpaf.c>
RPAFenable On
RPAFsethostname Off
RPAFproxy_ips 127.0.0.1 10.0.2.15
</IfModule>
from mod_rpaf.
This config is invalid for the current version of mod_rpaf, please confirm you are running a recent version.
from mod_rpaf.
OK, let's close this until I migrate to newer version. I do not have testing environment for this right now.
from mod_rpaf.
Related Issues (20)
- Updating remote IP on keep alive connections fails HOT 3
- Question related to a chain of proxies IP in X-Forwarded-For HOT 2
- IPv6 client IP not updated when using KeepAlive HOT 6
- RPAFproxy_ips seems to fail on CIDR notation HOT 4
- rpaf.conf has not been included in the release HOT 1
- SetPort always setting port to 443 HOT 31
- issue with OVH IP-Load-Balancing over HTTPS
- %h and %a in apache log show proxy IP, not X-Forwarded-For, but %{X-Forwarded-For}i works correctly HOT 4
- wildcard mask of 10.0.0.0/8 does not translate to proper ip addresses HOT 3
- Port and HTTPS often corrupted HOT 1
- Server IP Address Showing In _SERVER["REMOTE_ADDR"]. Is this OK?
- Please add a version number
- Possible bug with KeepAlive + RPAF_SetHostName On HOT 2
- Wrong IP in logs in error scenario
- mod_rpaf no longer resolves the right IPs for mod_status? HOT 10
- Could you reserve the origin data of "X-Forwarded-For" HOT 1
- httpd restart error HOT 5
- Invalid command 'RPAF_SetHTTPS' HOT 6
- when RPAF_SetHTTPS is on, rpaf doesn't replace ip address HOT 3
- 2.4.48 with proper HTTPS flag / host / port implementations
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mod_rpaf.