How do you set up a virtual host in Apache?

Answer Posted / abhay

<VirtualHost www.test.com>
ServerAdmin admin@test.com
DocumentRoot /home/apache/share/htdocs/hostedsites
ServerName www.test.com
ErrorLog /home/apache/logs/error/hostedsites/error_log
TransferLog /home/apache/logs/access/hostedsites/access_log
</VirtualHost>

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What’s the mod_perl module?

504


Is apache web server free?

505


What do you mean by a valid servername directive?

553


Does amazon use apache?

465


Can we cache files which are viewed frequently?

438






On which port apache server works?

472


How does apache server work?

490


what is difference between static module & dynamic module in apache?

453


What is systemd and systemctl?

515


What is the difference between service and systemctl?

451


Can you record all the cookies sent to your server by clients in web server logs?

560


How do I stop apache from restarting?

430


How do I enable apache modules?

471


Where are the apache logs?

489


If there is one ip address, than how to host two web sites on server?

459