The short answer is
http://localhost:8080/geoserver/cite/wms
The longer answer is that the URL in OpenLayers is the base URL of the web map server (so all the bit before the ? in the full URL). OpenLayers then adds the required parameters to make up the URL that is required to get a map. Some of those parameters are added from your layer definition (i.e. layers, transparent etc) and others from the map object (i.e. width/height and bounding box). See Lesson 8 of my old course to see a fuller discussion.
We do not use GeoServer Authentication, but we do use an ASP version of that Proxy Script we wrote ourselves with some tweaks.
Our script handles the authentication via a Hashtag we included in the WMS Client Calls.
The HashTag is set into a database at the Application Level User Login and removed at LogOut or Timeout. It is sent to the client via Ajax at Client logIn Time as well.
The Hashtag is used only once and is not repeated again for x amount of days. (we use one year)
We use a url format as follows (asp)
http://maps4.markware.net/?" & HashTag & ":-:" & LAYERS=
and parse out the hash between the ?
and the :-:
in the proxy script, check the tag is valid then rebuild the string to a new valid url pointing to the Geoserver instance.
Of course, you have to handle the return posts from Geoserver and forward back to the client, the script you mentioned handles that.
If your Geoserver Instance is behind the proxy and only accessible via a local lan, then this is all you need, It is secure. If not, you need to set up a firewall rule on the Geoserver machine that only allows port 8080 from your proxy Ip Address.
This way, we do not have to keep track of hosts and we handle authentication at the Application Level. Invalid or no hash tag, no tiles.
We later enhanced our script to load balance over multiple GeoServer Instances and forward some requests to GeoWebCache and some to GeoServer depending on the application requirements. It does give you a great deal of control over your setup!
Best Answer
These vendor parameters need to be sent to geoserver from OpenLayers. hence the parameter needs to be put in the options of the constructor of your layer.
So the simple way of constructing our layer is like this:
To pass on vendor parameters to the server, you'll need to do this:
These vendor specific parameters will be appended to the WMS requests that OpenLayers makes, and hence Geoserver will respond with an appropriate response.