After you install vFabric Web Server and create an instance, you can use it to host your entire Web site. This section does not describe the entire process; rather, it simply shows how to serve an HTML file from the default document root of your instance.
Create and start a vFabric Web Server instance. See Create vFabric Web Server Instances.
Create or download one or more sample HTML pages that you want to serve from the instance.
Open the configuration file for your vFabric Web Server instance
and make note of the value of the
which is the directory out of which the instance serves your
documents. By default, vFabric Web Server takes all requests from this
The configuration file is called
httpd.conf and is
located in the
, such as
DocumentRoot directive looks like the
Copy your sample HTML pages to the document root.
For example, if you have a
hello.html page in the
/home/samples directory that you want to serve up:
prompt# cp /home/samples/hello.html /opt/vmware/vfabric-web-server/myserver/htdocs
Invoke the HTML page in your browser using the vFabric Web Server instance.
For example, if your browser is running on the same computer as
vFabric Web Server and the instance is listening at the default port
80, the URL is as follows:
Because the instance is using the default port of 80, you do not have to explicitly specify it in the URL. If you set a different port, such as 8000, then the URL would be:
You should see your
hello.html page in your
You can create a directory hierarchy under the document root to better organize your HTML pages.
prompt# cd /opt/vmware/vfabric-web-server/myserver/htdocs prompt# mkdir fun prompt# cp /home/samples/hello.html fun
The URL to invoke the HTML page would now be:
Configure vFabric Web Server instances to take advantage features such as load balancing, virtual hosts, and SSL. See Configuring vFabric Web Server Instances.