Results 1 to 9 of 9

Thread: How to setup vhost and dns

  1. #1
    Join Date
    Oct 2005
    Beans
    34

    How to setup vhost and dns

    I just setup DNS server on my Ubuntu 8.04 that I use to run Apache2, PHP, MySQL. Setup was successful and I can access the server by hostname from another machines (both Linux and Windows box). dig and nslookup both seems to show correct result.

    Now I am trying to setup vhost so that I can access websites hosted on my server by domain names.

    Let's say my server's hostname is myserv.com
    I want to access my websites on that server by
    web1.myserv.com and web2.myserv.com

    After creating the vhost I can access web1.myserv.com from local machine... but I can't access it from another machine. I guess I need to edit my DNS zone or something... anyone can help? Thank you.

  2. #2
    Join Date
    Apr 2008
    Location
    United States
    Beans
    238
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How to setup vhost and dns

    DNS takes about 24-48 hours to update, so it could be that your sub-domain has not been updated into DNS systems yet. Try waiting and see what happens.

  3. #3
    Join Date
    Oct 2005
    Beans
    34

    Re: How to setup vhost and dns

    thanks for your reply darth-vader. But this is an intranet... shouldn't I expect to resolve immediately?

  4. #4
    Join Date
    Apr 2008
    Location
    United States
    Beans
    238
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How to setup vhost and dns

    your welcome on the reply. What are your other systems that you are trying to access from. What Browser?

    What is used for DNS

  5. #5
    Join Date
    Oct 2005
    Beans
    34

    Re: How to setup vhost and dns

    I am trying to access it from another Ubuntu box and Windows Vista.

    I use Bind9 for DNS... is that what you meant? Thanks.

  6. #6
    Join Date
    Oct 2005
    Beans
    34

    Re: How to setup vhost and dns

    I figured that I should update my DNS zone file /etc/bind/zones/myserv.com.db and add a CNAME entry... I did that but it doesn't help

  7. #7
    Join Date
    Jan 2007
    Beans
    323

    Re: How to setup vhost and dns

    Do your internal devices do lookups directly off your dns server? Can they ping web1 and web2?

  8. #8
    Join Date
    Oct 2007
    Location
    NJ
    Beans
    56

    Re: How to setup vhost and dns

    add a web1.yourserver.com as an ns extra record and assign it the ip of your webserver and then the virtual host will do the job.

  9. #9
    Join Date
    Oct 2005
    Beans
    34

    Re: How to setup vhost and dns

    I got it... it was my vhost file that caused the problem... but i don't understand why that could be a problem.

    Before, I set it up like this
    Code:
    <VirtualHost web1.myserv.com>
    ...
    It worked only after I changed it to
    Code:
    <VirtualHost *>
    ServerName web1.myserv.com
    ...

Tags for this Thread

Bookmarks

Posting Permissions

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