How to access website hosted in localhost from internet

Web programming topics
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: How to access website hosted in localhost from internet

Post by Neo » Sun Dec 26, 2010 12:57 am

Seems correct.
Nimalkad
Sergeant
Sergeant
Posts: 24
Joined: Thu Dec 31, 2009 10:57 am
Location: Rajagiriya, Sri Lanka

Re: How to access website hosted in localhost from internet

Post by Nimalkad » Wed Dec 29, 2010 6:47 pm

What is the best web server for Win XP?
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: How to access website hosted in localhost from internet

Post by Neo » Thu Dec 30, 2010 2:09 am

What is the best web server for Win XP?
Both IIS and Apache works well on Windows XP.

Note: Always start a new topic without adding out of topic posts.. Read point 11, 12 on Terms of use.
thegtaguy
Corporal
Corporal
Posts: 9
Joined: Fri Dec 17, 2010 8:48 pm

Re: How to access website hosted in localhost from internet

Post by thegtaguy » Sun Jan 02, 2011 8:38 pm

I'm not able to setup my webmail server.
I opened the ports 25(SMTP) , 110(POP3) , 143(IMAP)
I installed Mdaemon.
I don't have any idea on how to configure it.

Please help configure it and give me a tour on Mdaemon !!
Thanks >>
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: How to access website hosted in localhost from internet

Post by Neo » Sun Jan 02, 2011 11:10 pm

I opened the ports 25(SMTP) , 110(POP3) , 143(IMAP)
I think you mean you forwarded those ports to your PC.
I installed Mdaemon.
I don't have any idea on how to configure it.

Please help configure it and give me a tour on Mdaemon !!
You can find the tutorial from this page http://www.altn.com/Training/Tutorials/.
Sorry, I don't have time to work like that other than giving tips.
Pansophic
Sergeant
Sergeant
Posts: 25
Joined: Sun Feb 13, 2011 4:05 pm

Re: How to access website hosted in localhost from internet

Post by Pansophic » Tue Mar 01, 2011 2:32 pm

I think the first step is not needed, overall nice tutorial :)
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: How to access website hosted in localhost from internet

Post by Neo » Tue Mar 01, 2011 2:49 pm

I think the first step is not needed
I guess you mean "Assign a static IP to your computer (with web server)". This is an essential step. With dynamically assigned IP from your local router (by DHCP), you can't do port forwarding.
Pansophic
Sergeant
Sergeant
Posts: 25
Joined: Sun Feb 13, 2011 4:05 pm

Re: How to access website hosted in localhost from internet

Post by Pansophic » Tue Mar 01, 2011 3:25 pm

Neo wrote:
I think the first step is not needed
I guess you mean "Assign a static IP to your computer (with web server)". This is an essential step. With dynamically assigned IP from your local router (by DHCP), you can't do port forwarding.
I have done this before without assinging static ip to my computer and it worked fine :)
Pansophic
Sergeant
Sergeant
Posts: 25
Joined: Sun Feb 13, 2011 4:05 pm

Re: How to access website hosted in localhost from internet

Post by Pansophic » Tue Mar 01, 2011 3:26 pm

I use no-ip thought and no-ip duc to update my external ip address.
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: How to access website hosted in localhost from internet

Post by Neo » Tue Mar 01, 2011 5:48 pm

Say your router (DSL) is assigned with a IP: 204.115.56.110. This IP is accessible form internet.
So your PC is connected to your router with either a Static or a Dynamic IP. (Even you use a USB cable, you will be assigned with a virtual IP). Say you are using dynamic IPs. That is, your router has DHCP enabled where it sends you an IP every time your PC is powered up. Say your PC assigned with an IP 192.168.0.11 this time. The next time you power your PC up it could be 192.168.0.15. Ok so far?

Now you are going to define port forwarding. We need to all packets that are received to port 80 to be diverted to your PC. Say you have defined port forwarding as 192.168.0.11/80. So all packets that are coming to port 80 are diverted to the PC with IP 192.168.0.11. Next time when your PC get the IP 192.168.0.15, there is no way the router knows that your IP is updated. So it simply diverts port 80 packets to IP 192.168.0.11. This IP might have assigned to another computer or doesn't exists at all.

Can you understand the issue now... It is simply required to have a Static IP on your computer so that the router can always divert port 80 packets to your computer always (even after you restart your PC). (Note that I'm not referring to a static IP on your router which needs to be obtained from your ISP).
Post Reply

Return to “Web programming”