virtual Host Configuration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • somaskarthic
    New Member
    • Aug 2006
    • 60

    virtual Host Configuration

    Hi

    I need to set up a virtual host . Let me know the steps involved to set up a virtual host. So that , though the internet connection is not available , i could access my intranet pages as www.example.com .

    Please shower ur inputs.

    Thanks in advance.

    Somaskarthic
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    You keep entering double posts, this time in the Linux forum!!
    This thread belongs in the Apache forum. Will redirect it.
    moderator :cool:

    Comment

    • cassbiz
      New Member
      • Oct 2006
      • 202

      #3
      There are several different areas that you need to set up.

      On RedHat Linux you will need to do the following:

      in /etc/named.conf you will need to create a zone entry for your domain.

      Code:
      zone "example.com" IN {       type master;    file "example.com";   allow-update { 192.168.0.1; localhost; }; }
      Change the IP Address 192... to your server IP and example.com to your domain name.

      Then in /var/named you will have to create a Zone file

      Code:
      $TTL 86400
      @               IN      SOA     ns.yourserver.com. 
      sysadmin.yourserver.com. (
                              2007120301 ;
                              3600 ; refresh
                              900 ; retry
                              1209600 ; expire
                              86400 ; default_ttl
                              )
      example.com.     IN      MX      10      mail.example.com.
      mail            IN      A       192.168.0.1
      @               IN      NS      ns.yourserver.com.
      @               IN      NS      ns1.yourserver.com.
      home          IN      A       192.168.0.1
      secure        IN      A       192.168.0.1
      ;virtual domain information
      ftp             IN      A       192.168.0.1
      @             IN      A       192.168.0.1
      www         IN      A       192.168.0.1
      After you have your Zone files then you will need to add an entry into your httpd.conf

      On my server it is located at /etc/httpd/conf (it may be somewhere else on your server)

      Here is the VirtualHost information

      Code:
      <VirtualHost 192.168.0.1:80>
      ServerAdmin sysadmin@yourserver.com
      DocumentRoot /domains/example.com
      ServerName example.com
      ServerAlias www.example.com
      ErrorLog /domain/example.com/logs/error_log
      CustomLog /domains/example.com/logs/access_log combined
      ErrorDocument 404 /oops/404.html
      ErrorDocument 500 /oops/500.html
      </VirtualHost>
      After you have all of the info entered then you will have to restart your named and httpd

      Comment

      Working...