Find the answer to your Linux question:
Results 1 to 6 of 6
Hi folks, VMWare Server Bridged connection Ubuntu 7.04 server amd64 (Host) Apache/2.2.3 LAN IP 192.168.0.10 CentOS 5 x86_64 (Guest) Apache LAN IP 192.168.0.20 Router All www ports, 80, 443 and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,778

    Seeking for vhosts tutorial, name-base


    Hi folks,


    VMWare Server
    Bridged connection


    Ubuntu 7.04 server amd64 (Host)
    Apache/2.2.3
    LAN IP 192.168.0.10


    CentOS 5 x86_64 (Guest)
    Apache
    LAN IP 192.168.0.20


    Router
    All www ports, 80, 443 and 8080 are connected to Ubuntu
    No port forwarded to CentOS


    Domain
    domain1.com - pointing to Ubuntu
    domain2.com - pointing to CentOS



    Can any folk advise me where can I find a tutorial to setup vhosts, name-base, on Ubuntu? Google search brought me;

    HOWTO Apache VirtualHost by IP Address - Gentoo Linux Wiki

    which, I think, can be modified for my use. But I can't find /etc/apache2/conf/vhosts/vhosts.conf. Whether I have to create it together with the directories above /conf/vhosts/vhosts.conf. OR their file structure is different to Ubuntu. Advice would be appreciated. TIA



    B.R.
    satimis

  2. #2
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077

  3. #3
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,778
    Quote Originally Posted by jledhead View Post
    Thanks


    satimis

  4. #4
    Linux Newbie athlon_crazy's Avatar
    Join Date
    Sep 2007
    Location
    Malaysia
    Posts
    132
    Each distros may or may not have a different vhost conf. BTW, for Centos you can use webmin package from your linux distribution to setup your multiple vhost.

  5. #5
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,778
    Quote Originally Posted by athlon_crazy View Post
    Each distros may or may not have a different vhost conf. BTW, for Centos you can use webmin package from your linux distribution to setup your multiple vhost.
    Thanks for your advice.


    Webmin is running on Ubuntu NOT on CentOS. I'll test vhost on Ubuntu. Would it be possible pointing one of host to CentOS? This is only test. I wonder whether a domain.com can visit Apache on CentOS running on the same IP addr (one public IP)? Not with domain.com : port (8080/443). TIA


    B.R.
    satimis

  6. #6
    Just Joined!
    Join Date
    Dec 2007
    Posts
    11

    Smile vhost

    I think you need to create the directory path. I use centos, and I have not
    seen that path at any time. For example, I usually keep my virtual hosts files, the files the web server serves, under this path: /opt/www/vhosts. This is a path I created: mkdir -p /opt/www/vhosts.

    The vhosts configuration files, I usually keep them under this path:
    /etc/httpd/vhosts.d, which I also created. Note that only the path /opt and /etc/httpd existed previously since they are created when you first install your linux system.

    My httpd.conf file is under its regular path: /etc/httpd/conf.

    Now, if you choose to do things this way, then you would need to add this line on your httpd.conf file:

    Include vhosts.d/*.conf

    This will load your virtual hosts configuration files onto the httpd.conf file.

    I hope this helps.

    Thanks.
    --Willie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •