To add a virtual host, you must add information to the httpd.conf file.
Adding Apache httpd.conf Lines
From the httpd.conf file, add the following:
# point utahjrs.org to subdirectory utahjrs
کد:
<VirtualHost www.utahjrs.org utahjrs.org>
ServerName www.utahjrs.org
ServerAdmin webmaster@utahjrs.org
DocumentRoot /usr/local/etc/httpd/vhosts/utahjrs
</VirtualHost>
Setting up Additional Options for Virtual HostsA Virtual Host Example (utahjrs.org)
The following lines were added:
# point utahjrs.org to subdirectory utahjrs
کد:
<VirtualHost www.utahjrs.org utahjrs.org>
ServerName www.utahjrs.org
ServerAdmin utahjrs@utahjrs.org
DocumentRoot /usr/local/etc/httpd/vhosts/utahjrs
TransferLog logs/utahjrs_access
ScriptAlias /cgi-bin/ /usr/local/etc/httpd/htdocs/utahjrs/cgi-bin/
ErrorDocument 404 /errors/notfound.html
</VirtualHost>