Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Two Domains, Two Servers, One External IP Address


  • Please log in to reply

#1
JeremyTheNerd

JeremyTheNerd

    New Member

  • Member
  • Pip
  • 3 posts
OK - I've been searching for this for a couple of days now and have came up empty handed. Here's an overview of my environment:

Webserver A: Hosts mydomain.net and runs on port 80, uses XAMPP
Webserver B: Raspberry Pi running Raspbian, hosts myotherdomain.net and runs on port 8080, uses nginx

My ISP is Mediacom (not really relevant but just so you know I have a residential ISP)

I have one external IP address.

I use freedns.afraid.org as my Dynamic DNS and I use GoDaddy for the domain names.

If I go to myotherdomain.net:8080 it works all find and dandy.
If I go to mydomain.net it works all fine and dandy.
If I go to myotherdomain.net it will send me to mydomain.net as that server is running on port 80.

What I want to do is make it so that I do not have to type the 8080 at the end of myotherdomain.net. I have tried doing a couple of the redirect methods I have found for nginx, however, it's not working.

My current train of thought: I think I need to do a redirect on Webserver A, since it's setup on port 80, so that when it sees myotherdomain.net it will automatically forward to myotherdomain.net:8080. And that's where my problem is - I have no idea how to do that, what it's called to do a better search for it, or really where to begin.

My first post here so be nice :-)

Thanks!
  • 0

Advertisements


#2
SleepyDude

SleepyDude

    Trusted Helper

  • Malware Removal
  • 4,148 posts
Hi Jeremy :welcome:

I'm not an expert on that area but you probably can accomplish that using Virtual Hosts and a redirect to the other server I guess!
Something to start Setting Up Virtual Hosts for XAMPP
  • 0

#3
JeremyTheNerd

JeremyTheNerd

    New Member

  • Topic Starter
  • Member
  • Pip
  • 3 posts
When doing virtual hosts it requires you to point to a directory, which would be on the other server. Would that work to put the other server's local directory there?
  • 0

#4
SleepyDude

SleepyDude

    Trusted Helper

  • Malware Removal
  • 4,148 posts

When doing virtual hosts it requires you to point to a directory, which would be on the other server. Would that work to put the other server's local directory there?


I suppose you can do it, check the Apache documentation.

Another possibility point to a folder only with a webpage with auto redirect to the other server http://server2:8080
  • 0

#5
JeremyTheNerd

JeremyTheNerd

    New Member

  • Topic Starter
  • Member
  • Pip
  • 3 posts
After a lot of failed attempts I decided to just do virtual hosts and run both sites off the same server. My goal was to use my Raspberry Pi as a low power web server but I'll just repurpose that

Thanks for the replies!
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP