tomfmason Posted December 14, 2008 Share Posted December 14, 2008 I have done this particular setup many times and have never seen this before. Basically I want to proxy all requests to this vhost to an application running on a local port. This a default install of apache2 on debian etch with mod_proxy. I have both mod_proxy and mod_proxy_http loaded. Here are the configs in question: #proxy config <IfModule mod_proxy.c> ProxyRequests Off <Proxy *> AddDefaultCharset off Order deny,allow Deny from all ProxyFtpDirCharset UTF-8 </Proxy> ProxyVia On </IfModule> #example virtualhost <VirtualHost 127.0.0.1:80> ServerAdmin admin@domain ServerName domain DocumentRoot /path/to/app/public <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /path/to/app/public> Options Indexes FollowSymLinks MultiViews AllowOverride ALL Order allow,deny allow from all </Directory> <Proxy *> Order allow,deny Allow from all </Proxy> #RewriteEngine on #RewriteRule ^(.*)$ http://127.0.0.1:5000/$1 [P,L] ProxyPass / http://127.0.0.1:5000/ ProxyPassReverse / http://127.0.0.1:5000/ ProxyPreserveHost On CustomLog /var/log/apache2/access.log combined ErrorLog /var/log/apache2/error.log LogLevel warn ServerSignature On </VirtualHost> Both the rewrite and proxy pass are redirecting to 127.0.0.1:5000. I don't see anything at all in either the access or error logs. It doesn't even appear that the request ever touches apache. Any ideas or suggestions? Link to comment https://forums.phpfreaks.com/topic/136900-mod_proxy-only-redirecting/ Share on other sites More sharing options...
tomfmason Posted December 14, 2008 Author Share Posted December 14, 2008 What is really odd is that if I place the rewrites in a .htaccess in the public directory and remove the rewrite/ProxyPass from the vhost it works as expected. Link to comment https://forums.phpfreaks.com/topic/136900-mod_proxy-only-redirecting/#findComment-714989 Share on other sites More sharing options...
steviewdr Posted December 14, 2008 Share Posted December 14, 2008 You could try putting the proxypass inside a <location> </location> in yout vhost config. http://httpd.apache.org/docs/2.0/mod/mod_proxy.html#proxypass Not sure apart from that. -steve Link to comment https://forums.phpfreaks.com/topic/136900-mod_proxy-only-redirecting/#findComment-715289 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.