hi, i install apache now, and i use VH . i want that if someone visit my server by ip. apache will show him / Code: var/www/html/ untill now they see my website on /var/www/admin
Code: [root@server ~]# httpd -S VirtualHost configuration: 192.168.206.5:80 is a NameVirtualHost default server www.my-dns.co.il (/usr/local/myadmin/users/admin.conf:7) port 80 namevhost www.xxxx.co.il (/usr/local/myadmin/users/admin.conf:7) port 80 namevhost www.ben.xxxx.co.il (/usr/local/myadmin/users/benben.conf:7) port 80 namevhost www.q.xxxx.co.il (/usr/local/myadmin/users/shali.conf:7) port 80 namevhost www.v.xxxx.co.il (/usr/local/myadmin/users/idan.conf:7) port 80 namevhost www.sss.xxxx.co.il (/usr/local/myadmin/users/video.conf:7) Syntax OK i'm using centos 5.5 and apache:2.2.17 in my httpd.conf Code: ServerRoot "/etc/httpd" DocumentRoot "/var/www/htdocs" this the 'Main' server configuration
xxx.co.il it's not the read domain,it's for to show how it's look like Code: ServerRoot /etc/httpd <VirtualHost 192.168.206.5:80> ServerName www.xxx.co.il ServerAlias www.xxx.co.il xxx.co.il ServerAdmin [email protected] DocumentRoot /home/admin/public_html ScriptAlias /cgi-bin/ /home/admin/public_html/cgi-bin/ CustomLog /etc/httpd/logs/admin.bytes bytes CustomLog /etc/httpd/logs/admin.log combined ErrorLog /etc/httpd/logs/admin.error.log <Directory /home/admin/public_html> AllowOverride Options Options +ExecCGI AddHandler cgi-script .cgi </Directory> </VirtualHost>