Find the answer to your Linux question:
Results 1 to 6 of 6
hello all. I have two boxes both on slackware. I use one as my main server and the second for my tests. So I went and bought 2 domain names ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2005
    Posts
    40

    two servers running under a wireless router


    hello all.
    I have two boxes both on slackware.
    I use one as my main server and the second for my tests.
    So I went and bought 2 domain names from the same vendor and I also use their dns server for both domains.
    Both boxes connect to the internet through linksys wireless pci cars and a linksys wireless router.
    My main server runs apache 1.3 the test server runs apache 2.2.
    Here comes my problem.
    I go to browse the apache 2.2 server on domain#2 and I get the website of my server apache 1.3 which is domain#1. If I browse domain#1 I get apache1.3 as supposed to be.
    On my test server which is domain#2 apache 2.2 if I http://localhost I see its original webpage so I assume that the server runs good.
    Saying that i have enabled the ports (80) for both servers ips.
    I also tried to make apache2.2 to listen to port (8080) but I got the same results.
    Any clues?
    Thank you.

  2. #2
    Linux Guru sdousley's Avatar
    Join Date
    Feb 2004
    Posts
    1,790
    For these to work externally, you will need to configure the port forwarding on seperate ports, unless your router allows per-domain forwarding (which i highly doubt)

    In this situation, you will need a setup like mine. Setup port 80 to forward to the main server (you dont want the main server on port 80 and a test on another port) and then setup port 8080 (i find is a good alternative to 80 for http) to forward to the other internal server. You will not (unfortunately) be able to get them both to work externally on the same port. Not that i can think of with one internet connection anyway.
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

  3. #3
    Linux Enthusiast
    Join Date
    Dec 2004
    Posts
    637
    As I have read and assuming my uderstanding, you are wanting to run two Web servers from your network, correct? If so, you will need two static IP addresses in order to serve both domains or dynamic via a DDNS service (not recommended). Once you set this up you can configure your NAT using the two public IPs wihout a problem, but your Linksys wireless setup will not support multiple public interfaces.

  4. #4
    Just Joined!
    Join Date
    Dec 2005
    Posts
    40
    As I said I tried to put the main server on port 80 and the test server on port(8080) but it didnt work.
    What if I will try to set a dns server on my test box and take it off from the vendors dns?
    Is that going to work?
    Because as I see it no matter what my router will pick the first http port and forward any requests to it no matter what the domain name says.
    What about that virtual (host ,domain, im not sure right now what the option exactly is) option I see on my routers manager?
    Thank you.

  5. #5
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    in addition to changing the ports on apache installs, you also have to create 2 firewall rules, one opening port 80 and one opening port 8080 and forwarding to the correct location.

    you can however setup 1 install of apache to host 2 completly seperate domains . unless you are just trying to play around between apache versions this is what I would do. Then both dns names will go to the same machine and apache will decide what directory to pull the information from
    apache 1.3
    http://httpd.apache.org/docs/1.3/vhosts/name-based.html
    2.0
    http://httpd.apache.org/docs/2.0/vhosts/name-based.html


    if not then you need to be more specific when you say using port 8080 doesn't work. The dns shouldn't make a difference, its obviosly working if the ip's lead back to you. But when browsing from the outside the url would have to be http://yoururl.com:8080

  6. #6
    Just Joined!
    Join Date
    Dec 2005
    Posts
    40
    Cool
    Thank you.

Posting Permissions

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