Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Problems with OpenLayers and WFS - proxy.cgi issues

I have seen some example related to WMS Get Feature Info like :

In this example they are using

 OpenLayers.ProxyHost = "proxy.cgi?url=";

My question is :

How we can setup our own proxthost for our geoserver layers?

Help would be appreciated.

share|improve this question

marked as duplicate by iant, whuber Nov 4 '12 at 20:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Hello guys I'm confused with the official openlayers explanation for the proxyHost... tell me if am wrong.. does this mean that I have to host an apache http server with the .cgi file in order for people using my openlayers pages to get WMSFeatures and capabilities? My software is using local javascript/html files to run openlayers so we do not currently have a server – Manuel Arredondo Sep 17 '12 at 18:55
@ManuelArredondo Unfortunately, yes. What OS are you using btw? If you're on Windows, you could try XAMPP. If you're on Ubuntu, just install Apache using apt. If you want further clarification, it would be best to ask a question so that others might learn, too. – R.K. Sep 18 '12 at 5:55

The OpenLayers FAQ has a section on setting up your own ProxyHost. Here's the relevant excerpt:

How do I set up a ProxyHost?

An example proxy host script is available here: trunk/openlayers/examples/proxy.cgi

For the standard Apache configuration, you would place proxy.cgi into your /usr/lib/cgi-bin/ directory.

Once a proxy host script has been installed, you must then edit the OpenLayers.ProxyHost variable to match that URL.

Given the above standard Apache configuration:

OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; 

If you have done something like this, you should be able to visit:

The resulting content at that page should be the website.

If you get a 404 error instead, either the proxy script is not in the right location, or your webserver is not configured correctly.

share|improve this answer
Thanks for your reply. What we need to mention in proxy.cgi?Is there any thing we need to change in the following proxy url:… – Rare Piece Mar 15 '12 at 7:10
It should work as is if I am not mistaken. – R.K. Mar 15 '12 at 7:46

If you want to use Server side C# proxy, then use you can try this proxy

share|improve this answer

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