Forum Moderators: phranque
I am having problems getting a local redirect working on my apache installation... I am running a Plone server on port 8888 and PHP / Apache / MySQL on port 80. I am now trying to get plone to work through apache through redirects but it is not working... The problem being that the vhost is giving 403 messages on any url I try to redirect into.
I have been playing around with different combinations of configurations for about a week - with no avail... Does anybody have an idea what I am doing wrong?
Apache Version:
Apache/2.0.52 (Win32) mod_ssl/2.0.52 OpenSSL/0.9.7d PHP/5.0.2
from an xampp installation
Virtual Host Code:
NameVirtualHost *:80
#default
<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/webroot"
</VirtualHost>#plone
<VirtualHost *:80>
ServerName www.myserver.co.uk
RewriteEngine On
RewriteRule ^/(.*) http://localhost:8888/$1 [P]
</VirtualHost>
I have mod_proxy and mod_rewrite enabled, and have set default directories to
<Directory />
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory> I'm sure it is something really simple but I can't work out the problem whatsoever, any help is appreciated.
Best Regards,
Mark Starmer
ProxyPass / http://localhost:8888/
The 403 might be related to the proxy configuration; check that you don't have the
<Directory proxy:*> defined in the config files (which you don't need if you have ProxyRequests directive set to Off).
I have changed the command to ProxyPass and still get exactly the same error.
<VirtualHost *:80>
ServerName myserver.domain
ProxyRequests On
ProxyVia On
Options All +FollowSymLinks
ProxyPass / [localhost:8888...]
</VirtualHost>
I tried to add a <Directory proxy:*> clause and recieved the following error
EXECUTING:
"C:\apachefriends\xampp\apache\bin\Apache.exe" -n "Apache2" -k start
Syntax error on line 1040 of C:/apachefriends/xampp/apache/conf/httpd.conf:
<Directory "proxy:*"> path is invalid.
The <Directory proxy:*> declaration I used was taken from the mod_proxy examples...
ProxyRequests On
ProxyVia On
<Directory proxy:*>
Order deny,allow
Deny from all
Allow from internal.example.com
</Directory>
I tried putting it within my virtual host and within the apache2 <if mod_proxy> section, but got the same error both times...
Any ideas?
1.) Check out which modules are loaded (LoadModule and AddModule directives), is the mod_proxy and the mod_proxy_http modules are loaded? Consider enabling and configuring the mod_info module for acquiring precise information on this.
2.) Take out all the
<Directory proxy:>...</Directory> and the <Proxy>...</Proxy> containers, together with their contents (so not only these, but everything which is between the opening and closing elements). ProxyRequests Off into the httpd.conf file, next to the other mod_proxy directives, so the proxy request will be disabled by default (so your Apache will not work as an open-proxy), the ProxyPass and the ProxyPassReverse directives are working without enabling the proxy requests.