We need to modify Apache configuration file httpd.conf for creating virtual host. At the end of the file we need to place below sample code.
<VirtualHost www.sunwaretech.net>
ServerAdmin admin@sunwaretech.net
DocumentRoot /home/apache/share/htdocs/hostedsites
ServerName www.sunwaretech.net
ErrorLog /home/apache/logs/error/hostedsites/error_log
TransferLog /home/apache/logs/access/hostedsites/access_log
</VirtualHost>
Simply we need to mention domain name, server admin email address, document root, server name and log files path.
<VirtualHost www.sunwaretech.net>
ServerAdmin admin@sunwaretech.net
DocumentRoot /home/apache/share/htdocs/hostedsites
ServerName www.sunwaretech.net
ErrorLog /home/apache/logs/error/hostedsites/error_log
TransferLog /home/apache/logs/access/hostedsites/access_log
</VirtualHost>
Simply we need to mention domain name, server admin email address, document root, server name and log files path.
No comments:
Post a Comment