Hosting online with xampp?

6

4

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.

Andrew

Posted 2010-12-30T03:07:23.577

Reputation: 133

3Before 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 – 2010-12-30T03:14:18.060

Oh, yeah, everything works fine locally. Just can't figure out how to get it working online. :( – Andrew – 2010-12-30T03:35:45.530

1Andrew, 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. – 2011-01-06T19:13:58.833

Tried it, and still didn't work. (Worked locally, though.) – Andrew – 2011-01-06T21:14:49.773

Answers

3

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.

kolypto

Posted 2010-12-30T03:07:23.577

Reputation: 2 861

1

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.

Josh K

Posted 2010-12-30T03:07:23.577

Reputation: 11 754

How would I go about doing that? I'm a total newb at this. – Andrew – 2010-12-30T03:23:30.043

Change the myip line to 0.0.0.0. Updating answer. – Josh K – 2010-12-30T04:24:21.093

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 – 2010-12-30T05:07:05.907

1

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.

NReilingh

Posted 2010-12-30T03:07:23.577

Reputation: 5 539

I'm pretty sure I forwarded them correctly - here's a picture of that page on my router's settings - http://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 – 2010-12-30T17:52:08.047

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 – 2010-12-30T18:01:31.723

Commented it out, and I haven't noticed any changes. – Andrew – 2010-12-30T18:56:47.390

Just in case... you're making sure to $ sudo apachectl graceful after each config file change before you test it again, right? – NReilingh – 2011-01-05T23:09:30.360

No, I've just been using the "xampp_restart" executable. – Andrew – 2011-01-06T00:32:56.033

Oh, duh. I'm sure that works fine. – NReilingh – 2011-01-06T06:56:02.613

1

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.

Benny

Posted 2010-12-30T03:07:23.577

Reputation: 658

1

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.

ubiquibacon

Posted 2010-12-30T03:07:23.577

Reputation: 7 287

ISP is Charter. The DNS client seems to be working, it gives no errors and says everything is good. – Andrew – 2011-01-12T02:46:18.807

@Andrew Charter is also my ISP and I host on them with XAMPP no problem. Have you tried my suggestions? – ubiquibacon – 2011-01-12T03:05:47.730

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 http://spull.dyndns.org/ and tell me what you see? =/.

– Andrew – 2011-01-12T03:22:29.867

@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 – 2011-01-12T03:25:02.597

@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 – 2011-01-12T03:29:33.297

@Andrew it is working on the LAN side of your modem, not the WAN side, that is why you can see it and I cannot. I know you said you already did this but verify that your port 80 (both UDP and TCP) are forwarded to the LOCAL IP of your server (i.e. 192.168.x.x or something of the sort). Turn off your server firewall, anti-virus, and anything else that could tamper with your connection till you get your problem sorted out, then you can turn them back on one by one later. Also, what version of Windows are you running? – ubiquibacon – 2011-01-12T03:33:06.287

@typoking - I double checked the ports, and they're both forwarded to the local IP. (As well as 8080, 443, and 8085). All firewalls are turned off, as well. I'm running Windows Vista. – Andrew – 2011-01-12T03:40:29.390

@Andrew log into your DynDns account and click on my service, verify that your Hostname is spull.dyndns.org, your Service is Host and under Info is your WAN IP address. You can find your WAN IP address by going to http://whatismyipaddress.com/

– ubiquibacon – 2011-01-12T03:44:51.643

@typoking - It was set to 192.168.0.11 for some reason. Changed it to the right thing, though. – Andrew – 2011-01-12T03:48:53.443

@Andrew you should not have to change the IP address under Info of your DynDns account if the updater is working correctly, that is what the updater does. Let us continue this in a Chat. Click chat at the top of the screen and go to the chat room named Andrew. – ubiquibacon – 2011-01-12T03:58:42.147

I can't see anything on spull.dyndns.org – Benny – 2011-01-12T07:12:36.083

Yeah, I can view it locally, but I still can't figure out what's keeping other people from connecting to me. – Andrew – 2011-01-13T21:17:44.770

@Andrew did you ever figure out why your DDNS is being updated a LAN IP address (192.168.0.11 if I remember right) instead of your WAN IP address? I think once you get the IP address conflict on your local network figured out you will be good to go. – ubiquibacon – 2011-01-14T00:19:54.787

@typoknig - I didn't. I did a little searching around, and didn't find much help. I don't even know how that address came to be or what it represents, because I've only ever seen my router assign local IPs that look like 192.168.2.x – Andrew – 2011-01-14T06:09:38.727

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? – Andrew – 2011-01-18T07:30:13.397

0

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)

S.gfx

Posted 2010-12-30T03:07:23.577

Reputation: 1 643