0

I have some website PHP/SQL code running well on localhost w/ Apache2 (on my computer). I also have a server running Scientific Linux 6.2. While I think I'd be able to figure out how to put things on the server and access the website from the same network, I have no idea how to begin putting this server online (for example, so that I can type in some website whose name I register and get a login page).

This is totally foreign to me, I'm kind of learning things as I go. How would I go about doing this? (The people at Server Fault had a hard time understanding what my question is, so the following is a bit of clarification):

My question is, "Given the things I have enumerated above, what should my next step/s be?" I'm not looking for an explanation of a particular term, just, given a certain specific situation (I have a website and server with specific software capabilities) w/ a certain goal (I'd like to get that server online), what should I do next to achieve said goal? Is there any other special software I need, do I worry about my ISP or register w/ some other hosting company or something? I've done a lot of research, but don't know how to parse the information I've received, and am hoping for a more experienced opinion.

4
  • Where is your server located? Is it on the same network as your localhost or on a different network?
    – heavyd
    Jul 17, 2014 at 16:42
  • It's on the same network as my localhost currently, but I plan to move all the files from the localhost to the server. Jul 17, 2014 at 17:05
  • 1
    If not many people (just you + a few mates) are going to use the site then you need to configure Apache to listen on all IPs (0.0.0.0:*) on its config. You then forward port 80 from your router to your web server LAN IP. Make sure your web server LAN IP is static or reserved in DHCP. Then go to your public IP in browser (away from your network) and your site should work... If you change server in your building then repeat but change the LAN iP of the port forward. If lots of people are going to use and you want a domain name then I would recommend a hosting package.
    – Kinnectus
    Jul 17, 2014 at 17:22
  • 1
    If you want a domain name then you can buy one and set it to point to your home IP through your registrar...
    – Kinnectus
    Jul 17, 2014 at 17:24

1 Answer 1

1

The big steps are:

  • determine what port apache2 is running on. (probably 80, maybe 8080)
  • determine the IP address of that machine one the local network
  • on your router learn how to set up port forwarding. You want to forward the port 80 or 8080 (you can actually forward 80 to 8080 here as well, which has advantages). The IP to forward to will be the local network IP of the target machine.
  • now determine your Internet IP address, the simplest method just go to http://www.whatismyip.com/ and it's clearly displayed for you

Once that's set up, you can try (from a computer or mobile device not on your local network to go to http://XXX.XXX.XXX.XXX/path/to/app.php where the XXX's are your internet IP as just determined.

If that's not working it's most likely the configuration in your httpd.conf file is requiring a domain name, rather than an IP. In that case, I think DynDNS still lets you create one entry free, and that's all you need--but setting it up is another topic for a different question :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .