On this page:
Virtual hosting is a way for a single server (or a set of servers operating a single service) to provide web service under multiple host names. The names are registered as aliases for the machine and then the web service on the machine is configured to respond appropriately based on the name by which it was addressed.
This service provides a means for departments, registered student organizations, and other clearly established University services and functions to take advantage of a shortened URL space without running and maintaining a separate server. This service is not provided to individual user sites.
Websites hosted on the web.stanford.edu get virtual URLs assigned to them automatically. See "Automatic virtual hosting," below, for a description of Stanford sites in this category. If the automatic virtual host name does not meet your needs, you can request an additional one.
If your group has its own server and you need a virtual URL, then you need to have the virtual host name added to your server's NetDB record. If you don't have access to NetDB, you can submit a Help request. We try to not create virtual hosts with this service unless the site is on web.stanford.edu.
Automatic virtual hosting
Virtual URLs are automatically assigned for all individual, group, department, and class websites hosted on web.stanford.edu. If you have a:
- personal website under web.stanford.edu/~sunetid: the automatic virtual host is set up at sunetid.web.stanford.edu. For instance, if your SUNet ID is jdoe, you automatically have a virtual host at jdoe.web.stanford.edu. These are also available for any SUNet aliases you establish in StanfordYou. Other than these automatic virtual hosts, Stanford does not provide virtual URLs for personal websites.
- group website under web.stanford.edu/group/: the automatic virtual host setup is at groupname.group.stanford.edu. For instance, tango.group.stanford.edu/ maps to web.stanford.edu/group/tango/ automatically.
department website under web.stanford.edu/dept/: the automatic virtual host setup is at deptname.dept.stanford.edu. For instance, history.dept.stanford.edu/ maps to web.stanford.edu/dept/history/home/index.html automatically.
Automatic virtual hosting of this nature is not available class websites.
Virtual host eligibility criteria
Note: Please make sure that the automatic virtual hosting service is not sufficient for your needs before you request a new virtual host.
The Virtual Host service is available only to departments, research groups, and university-recognized student organizations. Virtual URLs can not be linked to an individual's personal web page. Please visit the following two websites to make sure your organization qualifies.
To be eligible for a virtual host, sites must meeting the following criteria:
- The virtual URL must meet the requirements set out in the Stanford.EDU Name / URL Assignment Policy. Please review this policy before completing the request form.
- Each organization is entitled to one virtual host name, which must closely and unambiguously match its recognized title.
- Your website must be hosted on web.stanford.edu. Virtual URLs for non-web.stanford.edu websites must be handled by the system administrator for that server. The following exceptions to this rule apply:
- You can request that a virtual URL go to a host outside the stanford.edu domain for services. For instance, you can request that sushilovers.stanford.edu go to www.sushilovers.org, provided you can give a valid reason for this redirect.
- You can request virtual URL and content proxying for non-Apache2 servers that require WebAuth. For instance, if you have an IIS server that only Stanford users should have access to, you can request a virtual URL to be WebAuth-protected and all traffic to be proxied by the proxy servers.
- The virtual URL host must not already be in use or reserved. For example, if you need the URL sushilovers.stanford.edu, then you need to confirm that the host name sushilovers is not already taken. You can visit StanfordWhat to check whether a machine with that host name already exists. If the host name already exists, you need to contact the owner or administrator of the host and ask them to relinquish the name first by removing the name from NetDB.
If you think your group or service should qualify for a virtual host, please put the reason and need in the Additional Information field of the request form.
Virtual host types
There are two basic types of virtual hosts: redirect and proxy
The virtual host name (for example, http://email.stanford.edu/) will simply be redirected to the current actual content site (for example, http://uit.stanford.edu/service/emailcalendar/email).
This most common type of virtual host service displays the real URL of your website in the browser window after your visitors use the virtual URL to get to the page. If you're not sure what you need, this is probably what you are looking for.
Most new virtual hosts are now set up directly through the web.stanford.edu sites as described above, and only a few uses for proxy servers remain.
If you do use a proxy server, the actual content server sees all the requests from the proxy and the browser only has contact with the proxy. This means that the virtual URL displays in the browser window after people arrive at your page.
The advantage to using direct proxy is that the real URL of your website will never be displayed to the end user. The disadvantage to using direct proxy is that all requests will appear to come from the proxy servers, making log parsing and metrics analysis of your website more difficult.
If your group hosts a server outside of Stanford and you need WebAuth protection for the virtual host name, the service must use the Proxy virtual host type.
You can specify the type and level of WebAuth protection you would like for your website. The following are the types of WebAuth protection offered:
- Allow only members of the Stanford community.
- Allow only members of one or more workgroups.
- Allow only a list of specified SUNet IDs.
WebAuth protection can be used in conjunction with basic protection as described below. For more information on how to use user authentication and authorization with WebAuth, please visit the WebAuth documentation and reference the Proxy Server IP Addresses page.
You can limit access to a specific domain or subdomain, commonly stanford.edu. This means that only registered computers on the Stanford University network will be allowed to access the website. This feature also requires the Proxy feature. Basic protection can be used in conjunctions with WebAuth protection.
More information about virtual hosting can be found at Apache Virtual Host server documentation.
If you have any questions, please submit a Help ticket.