How do I set my Apache server to be seen in the Internet?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
How do I set my Apache server to be seen in the Internet?
Hello Gurus!!!!
I need your help once again. I just finished setting up Linux with Apache, MySQL, and PHP. Everything seem to be working fine, using my system as localhost. Now I would like my web server to be seen in the internet. Here is my setup at home:
1) My server's operating system is Fedora Core 4 and uses wireless networking.
2) I have a cable modem (ISP provider: Comcast).
3) The cable modem is connected to a Linksys wireless router. The router is configured to have WEP encryption with keys.
4) My network's config is DHCP. My computers and router IP addresses are generic 192.168.*.*.
Do I really need to buy a Domain Name and/or IP address? If so, which company do you recommend? Which files do I need to edit? Do I need to change anything in my router? Please provide detail steps for I am still new at this.
hi sigsegv,
thanks for replying. i'll go search it out here and in google. i saw it before but could not seem to find it again. should have bookmarked it.
i don't expect a big traffic happening for my webserver. this is just a small project for myself using linux, apache. mysql, and php. but would love to actually see working in the outside world.
for those who knows the site where i can find the info, please send me the address or link. i'll continue looking for the time being.
You need to look at configuring a dynamic naming service such as DynDNS or No-IP to point through to your computer, and configure your cable modem to forward port 80 to your computer running Apache. As stated before, there are one or two threads on this already.
hello fouldsy,
thanks for helping out. i saw the thread. could you or anyone please help me understand the basics of it though so i know at least some on how it works?
this is how i understand it:
1) i make a domain name, say www.test.net. i get this domain name, if its available, from dyndns. they'll give me also an ip address, say 25.24.23.22.
2) i change my /etc/hosts file to have my new domain name and ip address and "keeping" my servers 192.168.5.5 localhost.
3) i change my router setting to forward port 80 from 25.24.23.22 to 192.168.5.5.
i have a linksys router. i could not find the area where i can do this forwarding. i see a port range forward with the following fields/columns:
Not sure about that router, would need read the associated docs for it. But, you shouldn't need to change your hosts file. Basically, you set one of the DynDNS clients to update their services when the IP address of your router changes. This means when someone enters the domain name, DynDNS take it, query their database to find your IP, and forward the request to your router. The router then points it to your computer. Some routers (again, check your docs) have a client built-in, so you don't have to do anything on your machine other than have Apache running and serving requests.
application should be apache, start & end should be 80, you might need to make it 81 depending, im not sure. but try 80 first. protocol should be TCP. and address should be your computer's address. set that address on your machine to be a static address. your default gateway should be 192.168.1.1, unless you have changed it, and the subnet mask is 255.255.255.0 unless you'e changed it. if it is a dynamic address, it changes, and might be the same, or it might be different, it all depends. with a static address, it will remain that same address always.. btw, that is a private address on your own network, there is a public address that your router has that it uses and it routes al;l traffic to your computer through complex algorithms. if you would like to learn more, get books on CCNA certification. you can get certified afterwards.
Now onto something useful! Glad you got everything working and is playing quite nicely across the Internet with a DynDNS address. Well done! As for security, you should be looking at the machine as a whole, the usual basic stuff. Turn off services you don't need. Remove software you don't need. Close ports that don't need to be open. Ensure permissions on the directories aren't set to 777. Ensure your passwords are strong. With Apache, maybe look at enabling SSL, preventing images being linked off site, limiting FTP access and/or upload size limits, etc.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.