Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How do you set up a virtual host in Apache?

Answers were Sorted based on User's Feedback



How do you set up a virtual host in Apache? ..

Answer / 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

How do you set up a virtual host in Apache? ..

Answer / 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

More Apache Interview Questions

I want to stop people using my site by proxy server. Is it possible?

0 Answers  


This is very strange. I am running apache 2.2 (compiled with gcc and all default params) on AIX 5.2.0.6 - 64 bit kernel. I edit the httpd.conf file to listen on two different ports -- Listen 8000 Listen 8001 The server will not start no errors or anything it just accepts the command but nothing starts. I can comment out on of the entires and everything starts up just fine minus the commented out port. Listen 8000 #Listen 8001 So, my problem is that I cannot get apache to listen on two ports, any ideas? Has someone else seen this before? Thanks,

2 Answers  


What is a difference between apache and nginx web server?

0 Answers  


Is apache license free?

0 Answers  


What is meaning of "listen" in httpd.conf file?

0 Answers  


Can apache and nginx run on the same server?

0 Answers  


How does apache license work?

0 Answers  


How do I download apache web server?

0 Answers  


Which is better apache or nginx?

0 Answers  


How to check the version of running apache web server?

0 Answers  


Does nginx need apache?

0 Answers  


What is httpd command?

0 Answers  


Categories