Apache VH

Discussion in 'Installation/Configuration' started by ben29, Dec 11, 2010.

  1. ben29

    ben29 New Member

    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
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Can you post Apache's default vhost configuration? Which distribution do you use?
     
  3. ben29

    ben29 New Member

    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
     
  4. falko

    falko Super Moderator Howtoforge Staff

    What's in /usr/local/myadmin/users/admin.conf?
     
  5. ben29

    ben29 New Member

    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>
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Looks ok. Can you post the vhost configuration of the vhost with the document root /var/www/admin?
     

Share This Page