To expand on my earlier comment for the benefit of Janne and other readers.
When you use OpenLayers to make a WFS (and WFS-T) request you need to be aware of the same-origin policy, this is a clever way to prevent unscrupulous web sites from running malicious javascript exploits on your web browser. Basically what it says is that if a javascript app wants to talk to the network it can only talk to the machine and port combination that it was served from.
This means that if you load a page from http:// localhost:8080 then that is the only place that your script can send requests to. Alternatively if you load your page from file://mytomcat/webapps/mypage.html your script can only send requests to file://mytomcat/... which isn't actually a server so it won't work.
It is a little more complicated than just adding proxy.cgi to your web server. From your post I assume you are developing you application on your local windows machine and connecting to Geoserver that is hosted on a separate web server somewhere.
The initial issue you are running into is the different domain issue. If a web applications javascript attempts to load data that is not of a very limited range of formats from a different webserver than the webserver that hosts the site the browser will not allow this to work. With the Geoserver and the OpenLayers.Control.WMSGetFeatureInfo the information can be presented in a number of different formats and that in turn triggers the Access-Control-Allow-Origin error.
The way to get around this is to add a proxy script to the same webserver (in this case your local machine) that is serving up the web application you are working on. The dependancy here will be that your webserver can run the script. For example if you are using tomcat or jetty I would recommend a .jsp script as it is supported by default by these systems. If you are using apache2 you will need to configure it to support whatever script you prefer.
I am going to assume you are using something simple like tomcat or jetty. If this is the case add this script in the root directory of your webapp:
<%@page session="false"%>
<%@page import="java.net.*,java.io.*" %>
<%
try {
String reqUrl = request.getQueryString();
URL url = new URL(reqUrl);
HttpURLConnection con = (HttpURLConnection)url.openConnection();
con.setDoOutput(true);
con.setRequestMethod(request.getMethod());
int clength = request.getContentLength();
if(clength > 0) {
con.setDoInput(true);
byte[] idata = new byte[clength];
request.getInputStream().read(idata, 0, clength);
con.getOutputStream().write(idata, 0, clength);
}
response.setContentType(con.getContentType());
BufferedReader rd = new BufferedReader(new InputStreamReader(con.getInputStream()));
String line;
while ((line = rd.readLine()) != null) {
out.println(line);
}
rd.close();
} catch(Exception e) {
response.setStatus(500);
}
%>
This should be something like [tomcat_root)/webapps/MyApplication/proxy.jsp
Now somewhere in you application before you make any openlayers calls ect add the following:
OpenLayers.ProxyHost = "/proxy.jsp?url=";
This should get around the issue. Of course depending on your setup you may need to adjust some of this to work in your particular situation. This is how I have setup my applications before and it works quite well.
One final thing to note is that this is a very basic proxy script that I have given you here. If you are going to put it on a production server you will need to be mindful that it presents a security risk and should be hardened to protect your sytem before putting it into production.
Best Answer
To fix this, go to the Global Settings page in the GeoServer configuration UI. There you enter http://links-map.com/geoserver/ in the "Proxy Base URL" field.