Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm not quite sure what I'm doing wrong, because from what I've read, this should all be working.

What I've done:

  1. Forwarded ports 80, 8080, and 443.
  2. Changed the ServerName localhost:80 line in \apache\conf\httpd.conf to ServerName myip:80.
  3. Registered at dyndns.com, and have been using their update client to link my IP to the DNS thingy.
  4. Made sure xampp was using port 80, and started apache and MySql.

And...nothing. What did I miss? =/.

Update: Disabled Windows Firewall and my router's firewall. Double-checked the port-forwarding, and it is set up correctly. Still nothing.

Update: I can view everything fine (spull.dyndns.org, 192.168.0.11, and the server's local IP) from inside the network, but not outside. I still can't view my WAN IP from inside the network, as well. The DDNS function on my router updates with a local IP instead of my WAN IP, still, also. Any suggestions?

Also, I'm using Ubuntu now, if that makes any difference.

share|improve this question
3  
Before you worry about port forwarding or DNS, make sure the server is running at all and that you can get HTML by going to http://localhost/ from the server computer. –  NReilingh Dec 30 '10 at 3:14
    
Oh, yeah, everything works fine locally. Just can't figure out how to get it working online. :( –  Andrew Dec 30 '10 at 3:35
1  
Andrew, can you check to see if your ISP allows hosting? A lot of home ISPs will block 80 as a hosting port to prevent users from putting up a website. You can try to check this by changing the hosting port, opening up that port and connecting the the website with that port on the end like 88.88.88.88:8085. If it works on another port, like 8085 then you may not be able to host on 80 with your current ISP. –  Jeff F. Jan 6 '11 at 19:13
    
Tried it, and still didn't work. (Worked locally, though.) –  Andrew Jan 6 '11 at 21:14
add comment

6 Answers 6

ServerName myip:80.

You should write your DynDNS subdomain name instead of your IP :) Also, in DynDNS you must manually specify the IP address of the host you're forwarding your ports to: DynDNS will only determine your personal IP.

share|improve this answer
add comment

Things to check:

  • You're binding to localhost not a public facing ip. Bind to 0.0.0.0 (all interfaces).
  • Make sure you're listening. Edit the Listen line in ports.conf to resemble Listen [public ip]:80
  • Ensure you're using the correct ip, use WhatIsMyIp.com.
  • Ensure you are accessible. Ping your computer through the public IP.
share|improve this answer
    
How would I go about doing that? I'm a total newb at this. –  Andrew Dec 30 '10 at 3:23
    
Change the myip line to 0.0.0.0. Updating answer. –  Josh K Dec 30 '10 at 4:24
    
Okay, changed the ServerName line to ServerName 0.0.0.0, couldn't find a ports.conf file (but there is a Listen line in httpd.conf - should I not change that?), double checked the IP, and I pinged myself and (I think) it's all good there. But still nothing when I try it in a browser. –  Andrew Dec 30 '10 at 5:07
add comment

Hmm... Are you sure you've forwarded the ports to the proper IP address? If you're on a LAN behind a router, you'll have a public IP which is assigned to the router's WAN port--that's what the DNS should point to. Then you'll have a LAN IP for the server behind the router. These IPs are usually distributed dynamically by the router and begin with 192.168.x.x. If your router supports it, you can do Static DHCP, which assigns a predetermined LAN IP to your server based on its MAC ID, or instead configure TCP/IP manually on your server by copy/pasting the subnet mask, DNS servers, and gateway IP from what's normally assigned by your router, and then choosing an IP address just outside of the range of what your router will assign. For example, my router assigns 192.168.1.[100-254], so I'll assign my server 192.168.1.42.

Oh, and make sure you're not running a firewall on your router or server.

You've mentioned it works locally, but does it also work on your local subnet? i.e. can you access the web server from another computer behind the router on your LAN, using your LAN IP? That'll help narrow down where the issue is.

share|improve this answer
    
I'm pretty sure I forwarded them correctly - here's a picture of that page on my router's settings - img834.imageshack.us/img834/1760/portsj.png. I double checked the firewall, and it looks all good. I ran the port_check that comes with xampp, and it says that apache is using port 80, which is good, right? I can access it from the server computer with the LAN IP, but not from other computers on the network. –  Andrew Dec 30 '10 at 17:52
    
Well, that at least narrows it down... you can ignore the port forwarding and DNS for now until you get other computers on the LAN able to access from 192.168.2.2. Just out of curiosity, what happens if you comment out the ServerName line entirely and change the Listen line to just Listen 80? Apache2 can figure out some of that on its own. –  NReilingh Dec 30 '10 at 18:01
    
Commented it out, and I haven't noticed any changes. –  Andrew Dec 30 '10 at 18:56
    
Just in case... you're making sure to $ sudo apachectl graceful after each config file change before you test it again, right? –  NReilingh Jan 5 '11 at 23:09
    
No, I've just been using the "xampp_restart" executable. –  Andrew Jan 6 '11 at 0:32
show 1 more comment

Who is your ISP?

Have you checked your DDNS account to make sure your PC updater client is working correctly? Let your router do the DDNS update if it is DDNS capable (a router that runs DD-WRT firmware is capable of this, and what I would recommend).

You don't need to change ServerName localhost:80, change it back.

For basic hosting you only need port 80, if you want to use Filezilla with XAMPP forward port 21 as well.

Beyond that XAMPP is pretty good (in my experience) at alerting you from its user interface if something is amiss.

share|improve this answer
    
ISP is Charter. The DNS client seems to be working, it gives no errors and says everything is good. –  Andrew Jan 12 '11 at 2:46
    
@Andrew Charter is also my ISP and I host on them with XAMPP no problem. Have you tried my suggestions? –  ubiquibacon Jan 12 '11 at 3:05
    
Yes. Never noticed the DDNS think on my router, so it had an option to enable it (which I did), filled in details from DynDNS, so I guess I'm good there. So I went to my DynDNS address, and apparently it's working. Just to be sure - can you go to spull.dyndns.org and tell me what you see? =/. –  Andrew Jan 12 '11 at 3:22
    
@Andrew I am not able to connect to you. Does your router confirm that your it has updated with your DDNS account? If it does then make sure you uninstall the client from your server. When you post back type @typoking so I will be alerted to your post. –  ubiquibacon Jan 12 '11 at 3:25
    
@typoking - Yes. (Well, it just says Registered. But before I updated it I couldn't see anything at the address I posted, so I assume it has to be working...?) I also just removed the updater client from my computer, as well. –  Andrew Jan 12 '11 at 3:29
show 10 more comments

I don't know if it will work but try UniServer or something that has a produation mode so that it works easily. I have tried UniServer in Prodution mode and it works live on the internet.

share|improve this answer
add comment

If you are on Windows, check if Windows firewall, or another firewall is blocking those ports, and if so, add the exceptions (you can do it in firewall properties). Also check if those ports are already being used by other applications. ( IIS, Skype, other Mysql instance, etc)

Alternatively there's also a wizzard like installer, (but is a slightly different stack) WAMPStack, from Bitnami.(or the other platform versions)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.