VirtualHost configuration

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

VirtualHost configuration

Tal Liron
I use virtual hosts a lot, but I almost always use setResourcePort so
that applications can work on different ports. I'm wondering:

1) What is setServerPort for?
2) What is setHostPort for?

Setting either of these seems to make no different in routing incoming
requests.

The JavaDocs for VirtualHost are very lean, and could definitely use
some more detail!

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3047996
Reply | Threaded
Open this post in threaded view
|

Re: VirtualHost configuration

Jerome Louvel-3
Hi Tal,

The hostPort lets you restrict not only the virtual domain name served by your virtual host, but also its port number, so you could have one separate virtual host per port number in theory.

The resourcePort could potentially be different from the hostPort if the HTTP request URI was provided in absolute form:

The serverPort is a property that restrict your virtual host to the actual listening port of your server socket, which might be different fro the hostPort when using port rerouting.

Best regards,
Jerome



2013/2/7 Tal Liron <[hidden email]>
I use virtual hosts a lot, but I almost always use setResourcePort so
that applications can work on different ports. I'm wondering:

1) What is setServerPort for?
2) What is setHostPort for?

Setting either of these seems to make no different in routing incoming
requests.

The JavaDocs for VirtualHost are very lean, and could definitely use
some more detail!

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3047996