SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Action! filmfoto's Avatar
    Join Date
    Dec 2001
    Location
    Sweden
    Posts
    278
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    One IP, 4 domains, firewall and server setup.

    First time webserver operator needs help.

    A client of mine wants to setup there own webserver. Up till now I've only used hosting companies for all my work, so setting up a server is pretty new to me. I've played around with a linux/server combination on a seperate partition for awhile to get the feel for it.


    Background:
    • 1 IP address
    • 4 domain names (let's call them domain1.com, domain2.com, etc...) The DNS for the domains are for the moment at the registrar.
    • 1 firewall
    • 1 Apache webserver running on FreeBSD

    I have 1 line in from my ISP with 1 IP connected to my firewall which is connected to my webserver.



    Questions:

    1. What is the best way to setup the domains to get access to seperate directories on the server? /home/domain1/public_html/, /home/domain2/public_html/, etc...

    2. What information should be in the DNS for each domain name? Should all of them point to the servers IP? Domain1.com IN A X.X.X.X?

    3. I gather the firewall will be configured with the IP provided from my ISP. A VPN will setup for the server and other possible workstations. Would the domain names be connected to different directories with their own VPN IP i.e. 192.X.X.X? How to setup?



    To push me in the right direction, please feel free and give me some pointers. Any input is of value.





    Cheers.

  2. #2
    epsilon transition cupid's Avatar
    Join Date
    Aug 2001
    Location
    Kent, Ohio
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: One IP, 4 domains, firewall and server setup.

    Originally posted by filmfoto

    Questions:

    1. What is the best way to setup the domains to get access to seperate directories on the server? /home/domain1/public_html/, /home/domain2/public_html/, etc...

    2. What information should be in the DNS for each domain name? Should all of them point to the servers IP? Domain1.com IN A X.X.X.X?

    3. I gather the firewall will be configured with the IP provided from my ISP. A VPN will setup for the server and other possible workstations. Would the domain names be connected to different directories with their own VPN IP i.e. 192.X.X.X? How to setup?

    To push me in the right direction, please feel free and give me some pointers. Any input is of value.

    Cheers.
    1) /home/username/public_html/ might be more appropriate.. it's the default scheme for unix file systems anyway. Although your /home/domain/public_html should present no problems.

    2) Yes, they should only point to one IP. You can then setup NameVirtualHosts on the machine to distinguish each domain. Keep in mind that if for some strange reason, a user chooses to browse to your IP address, the FIRST VirtualHost defined will be displayed.

    3) No, the domain names will not be configured with an unroutable IP (assuming that's what you meant by 192.x.x.x). They need an actual IP (probably the one they give you) to function. Refer to the usage of virtualHosts.


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
  •