Answer Posted / krishna
apache provide two type of virtual hosting 1- ip based and
2- name based.
to configure name based your dns should work properly.
go to the /etc/httpd/conf/httpd.conf file and remove # from
the start of of Namevertualhost *:80
and than at the end of file write the content below
<VirtualHost "IP of your apache server":80>
ServerAdmin root@krishna.com
DocumentRoot /var/www/krishna/krishna.html
DirectoryIndex krishna.html
ServerName www.krishna.com
ErrorLog /home/apache/logs/error/hostedsites/error_log
TransferLog /home/apache/logs/access/hostedsites/access_log
</VirtualHost>
restart your httpd service by running the command
Service httpd restart or /etc/init.d/httpd restart
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How secure is apache server?
What tool do you use for log analysis?
How do I know if apache is installed?
Which module is required to have redirection possible?
How does apache work?
What do you mean by documentroot of apache?
How would you kill the apache process if graceful stop doesn’t work?
How to create a csr?
What is the difference between apache and apache tomcat?
Does tomcat need apache?
What port is apache listening on?
How do I know if apache server is running windows?
What is an apache logs?
How do I download apache web server?
What is a Command to restart/start apache web server?