I know this should be very basic and simple in theory, but I need to complete this task, I'm new to this and for some reason I can't find a suitable example that works for me.

I am running apache 2.2 in windows 8. I need to access a website, let's call it x.com, through my proxy. The reason is that I need to show it in an iframe and also programmatically log in on it, for which I need to use javascript. This is prevented by cross domain ajax security constraints. By proxying the site I could do that.

I have installed Apache http server. Uncommented the following line

LoadModule proxy_module modules/mod_proxy.so

in file "httpd.conf" and overwritten file conf\extra\httpd-vhosts.conf with the following:

NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.localhost
    DocumentRoot "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/docs/dummy-host.localhost"
    ProxyRequests off
    ProxyPass /feature http://x.com/
    ProxyPassReverse /feature https://x.com/
    ProxyPassReverseCookieDomain x.com localhost
    ErrorLog "logs/dummy-host.localhost-error.log"
    CustomLog "logs/dummy-host.localhost-access.log" common
    <Directory "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/docs/dummy-host.localhost">
        AllowOverride all
        Order Deny,Allow
        Deny from all
        Allow from

I restarted the apache service, now I go to :


and get

Not Found

The requested URL /feature was not found on this server.

What could be wrong with this set up? Is there something else I need to configure?

Thank you


Browsing the same problem I had, I found the solution.
Simply, you have to uncomment few additional lines in file "httpd.conf":

 LoadModule proxy_http_module modules/mod_proxy_http.so  
 LoadModule vhost_alias_module modules/mod_vhost_alias.so  
 Include conf/extra/httpd-vhosts.conf  

In my case, It worked.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.