Events

Reports

Links

Latest forum posts

           
      AU-KBC
RESEARCH CENTRE

apache configuration

apache virtual hosts in CentOS

Posted by: lathagopichandar

Dated: Sat 31 Oct 2009

Note: Guidance given below is based on CenOS 5.3 version line numbers are tentative

  • create a directory such as /var/www/html/myvirtualhost and give permissions using chmod 777 /var/www/html/myvirtualhost
  • Assume 192.168.m.n as IP and 'localhost' as Servername. Open /etc/httpd/conf/httpd.conf and do the following.
  • line 266 : ServerName localhost:80
  • line 974 : NameVirtualHost 192.168.m.n:80
  • Uncomment the lines 987 to 993
  • line 987 : < virtualHost localhost:80>
  • line 988 :          ServerAdmin localhost
  • line 989 :          DocumentRoot  /var/www/htm/myvirtualhost
  • line 990 :          ServerName localhost
  • restart the service : service httpd restart
  • if your DNS is pointing correctly,you can access the virtual host over the web.

To make DNS point

  • Edit /etc/hosts : 192.168.m.n  localhost
  • Service network restart



Please login or register if you wish to post in this forum