 | How to set up an apache server behind a router with dynamic IP addresses |
March 24th, 2004, 05:48 AM
|
#1 (permalink)
| | Junior Member
Join Date: Mar 2004
Posts: 3
| How to set up an apache server behind a router with dynamic IP addresses
I want to test my website on my local machine with apache server. I have got a d-link 504 router but don't know much about how to access from outside. Could anyone tell me how to access from outside using external ip? I have heard something like port forwarding but have no idea about what it is and how it works.
Thanks a lot.
|
| |
March 24th, 2004, 06:32 AM
|
#2 (permalink)
| | Not Really a Member
Join Date: Oct 2001
Posts: 27,778
|
It depends on the router you're using....
You can go to www.whatismyip.com to find your Current IP.
Once you get it working you can use dynamic DNS provider like www.dyndns.org to register a domain name with your dynamic IP.
On your router you will have to forward port 80 to your webserver.
Note: Some ISP's do not allow port 80 requests to your machine, so you may have to use an alternative port to listen to.
__________________
Helicopters don't fly; they vibrate so much and make so much noise that the earth rejects them.
|
| |
March 24th, 2004, 07:07 AM
|
#3 (permalink)
| | Junior Member
Join Date: Mar 2004
Posts: 3
|
Thank you very much for your reply.
I forwarded port 80 to my internal ip (192.168.0.3). Then I tried to access the server by the external ip, say 12.34.56.78 and it doesn't work. I'm not sure if this problem is due to the isp or the apache config. Do I need to change anything in the file called httpd.conf? Also, Is it possible to check if port 80 has been blocked or is there any way to change the listening port?
when i try to access the server, do i need to type the port number at the end like 12.34.56.78:80 as well?
|
| |
March 24th, 2004, 07:14 AM
|
#4 (permalink)
| | Swine flu stopper
Join Date: Dec 2001 Location: BrisVegas, Australia
Posts: 11,748
|
Well, apache has to listen for something somewhere.
So, yes, you have to at least put where apache needs to listen in http.conf, otherwise it won't.  You can use IP address, but a fully qualified domain name is preferred, as it easier for others to remember.
And you should be able to access apache once you have configured it by typing http://ipaddress. Just the ipaddress without the http:// may not work. Port number is not required unless it is different from port 80, as 80 is standard for http.
Hope this helps a bit.
What OS are you running Apache with, BTW?
Cheers
Mick
__________________
I don't like sigs on forums like this.
|
| |
March 24th, 2004, 10:38 AM
|
#5 (permalink)
| | Junior Member
Join Date: Mar 2004
Posts: 3
|
Thank you for your reply.
I'm running WinXp pro, just wanna setup a server for testing my website...
Do I just need to add a line like Listen xxx.xxx.xxx.xx
in the httpd.conf?
Do I need to modify "ServerName" in the file as well?
also, I don't know if I should put the internal ip or the external ip.
one more question, how to test if my server can be accessed from outside?
|
| |
March 24th, 2004, 10:47 PM
|
#6 (permalink)
| | Ultimate Member
Join Date: Oct 2003 Location: Aztec, New Mexico
Posts: 1,609
|
Heh, maybe asking someone to try and connect to it... |
| |
March 24th, 2004, 11:22 PM
|
#7 (permalink)
| | Swine flu stopper
Join Date: Dec 2001 Location: BrisVegas, Australia
Posts: 11,748
|
Check the Apache for Windows pages for install / config info.
According to them: Quote:
After starting Apache running (either in a console window or as a service) it will be listening to port 80 (unless you changed the Port, Listen or BindAddress directives in the configuration files). To connect to the server and access the default page, launch a browser and enter this URL: http://localhost/
This should respond with a welcome page, and a link to the Apache manual. If nothing happens or you get an error, look in the error.log file in the logs directory. If your host isn't connected to the net, you may have to use this URL: http://127.0.0.1/
Once your basic installation is working, you should configure it properly by editing the files in the conf directory.
| Then goes on to tell you what to config.
Hope this helps.
Cheers
Mick
|
| | | Most Active Discussions | | | | | Recent Discussions  | | | | | | | | Thread Tools | Search this Thread |
| | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
| |