I am trying to use the apache's proxy module for working with xmpp on ubuntu desktop. For this i did the following things -
1) enabled mod_proxy by creating a symlink of proxy.conf, proxy.load and proxy_http.load from /etc/apache2/mods-available/ in the mods-enabled directory.
2) Added the following lines to the vhost
<Proxy http://mydomain.com/httpbind>
Order allow,deny
Allow from all
</Proxy>
ProxyPass /httpbind http://mydomain.com:7070/http-bind/
ProxyPassReverse /httpbind http://mydomain.com:7070/http-bind/
I am new to using the proxy module but what i can make from the above lines is that requests to http://mydomain.com/httpbind
will be forwarded to http://mydomain.com:7070/http-bind/
. Kindly correct if wrong.
3) added rule Allow from .mydomain.com
in /mods-available/proxy.conf
Now i try to access http://mydomain.com/httpbind
and it shows 403 Forbidden error..
What am i missing here ? Please help. thanks
Edit : The problem got solved when i changed the following code in mods_available/proxy.conf
<Proxy *>
AddDefaultCharset off
Order deny,allow
Deny from all
Allow from mydomain.com
</Proxy>
to
<Proxy *>
AddDefaultCharset off
Order deny,allow
#Deny from all
Allow from all
</Proxy>
Didnt get what was wrong with the initial code though
A 403 error code, however, means your access to the site is forbidden. The request was understood, but the site did not want to grant admittance. In some cases, the site will provide an explanation, but in others the site may merely respond with a 403 error code itself with no reasoning whatsoever.
A 403 Forbidden Error occurs when you do not have permission to access a web page or something else on a web server. It's usually a problem with the website itself. However, you can try refreshing the page, clearing your cache and cookies, and disconnecting from any VPN you might be using.
The 403 Forbidden error appears when your server denies you permission to access a page on your site. This is mainly caused by a faulty security plugin, a corrupt . htaccess file, or incorrect file permissions on your server.
I know this is an old question, but I came accross it in a google search. Just a quick explaination of why the code didn't work initially.
In your proxy definition, you define "Order deny,allow". This means that deny statements will take precedence over allow statements. You had "Deny from all" in your config. As this takes precedence, it doesn't matter if you have "allow from all", it would still deny all.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With