LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Setting up a web server from home (https://www.linuxquestions.org/questions/linux-software-2/setting-up-a-web-server-from-home-118742/)

edrabs 11-21-2003 11:26 PM

Setting up a web server from home
 
OK, I am currently running mandrake 9.1 with the version of Apache that comes with it. I have it all configured, and can access my webpage from another computer on my network. How can I access my page from outside my network?
Do I have to register with a domain service or, is there some way that I can get around doing this.
Thanks

Scruff 11-22-2003 12:18 AM

People could access it from your IP address as it is right now if they knew what it was. Basically though, you would be best if you had a registered domain name pointed at your box.

Do you have a static IP, or do you get one via DHCP? That is another potential pain in the ass. Static your IP stays the same. With DHCP it changes periodically making it difficult to maintain a server. I have heard of workarounds, but I don't know how specifically. I am trying to get a static IP from my ISP right now (verizon).

mcleodnine 11-22-2003 02:21 AM

One other 'gotcha' is that a lot of ISPs are blocking inbound ports 80 (http), 25 (smtp), and 21 (ftp) on consumer broadband connections. Generally if you want to run a server they'll want you to pony up about three to four times what you're already paying.

LinuxBlackBox 11-22-2003 07:24 AM

Check out dyndns.org, they offer a service for people with dynamic IPs so that every time your IP changes people will still be able to get to your site.
As for a domain name, you will need one if you want people to be able to recognize you on the web. They arent expensive, only $10 a year USD (and some places are cheaper if you sacrifice the service and support). You then set up forwarding on your domain so that all reuqests to <www.mydomain.com> get forwardec to your local server.

I am not entirely sure how to do this, but I think that you can get a 'http://mywebsite.com (no www) for free. Dont ask me how, though.

-LBB

Scruff 11-22-2003 08:10 AM

Thanks for the link LBB. Verizon is now telling me I would have to be a business customer which costs like $90 as opposed to the $34 I pay now. I asked what I get with the biz package (cause if it was phat enough I might have bought) and they told me I get 6 emails, 20 mb's of webspace, and the same bandwidth I get right now--1.5 down; 128 up) :rolleyes:

Awsome huh!? They knew right away why I wanted a static IP (to host mail, etc) and they are willing to provide me with mail and a whole 20mb's of webspace. I have 200gb's of webspace with unlimited mail, lol!

All I really wanted to do is use my family domain name for mail and some FTP stuff for family members. My old website is getting like 30,000 hits a month right now so I'm not hosting it on my bandwidth. I will shop around a bit though, as some providers around here supposedly give you a static IP for the same as I pay now. Hate to switch off verizon though. I've had 100% uptime since I got it 5 months ago, consistent speeds, and a reasonable price.

edrabs 11-22-2003 03:19 PM

Thanks for all the repies....
I think that my ISP (COX) is blocking my port because I can access my page from my laptop using my ip address, but when I am outside the network I can't...
I guess there is no way for me to get a freebee website using cox.
Thanks again

esteeven 11-22-2003 03:43 PM

edrabs - do you have a domain registered? If so, go to www.zoneedit.com and register with them. If you have a dynamic ip address, you'll need to download some software which will update zoneedit when your ip address changes - this is all well-documented on the zoneedit site http://www.zoneedit.com/doc/dynamic.html? . Point the nameservers for your domain (hopefully, you can do this. If you can't, transfer your domain to a company that lets you do this eg bigfoot) at zoneedit. When your domain is typed in, the first port of call is wherever you registered your domain - this redirects to wherever you have your nameserver pointed (zoneedit) - zoneedit redirects to the last updated ip address from the update software on your box. From this point, apache takes over. You can specify ports on zoneedit - if I rememebr correctly. Keep at it - I sweated with the same thing for two weeks. The whole process reduced me to tears twice and made me look at my cat in such a way that made the cat think I was about to kick it (I didn't!)

carstenson 11-24-2003 09:09 AM

Here's another thought, edrabs. If this site is only for family and friends, you might try using a port that cox is not blocking. I assume that apache can do this. This just means that the port needs to be specified after the address of the url (e.g. http://yourdomain.com:8080).

pld 11-24-2003 09:16 AM

Just my $0.02. I have been using www.no-ip.com for years now. they have been pretty darn good about forwarding for my small web projects (personal stuff, and small hit stuff). You might want to check it out!

They even have a linux tool for automatically updating your ip address if you have a dynamic ip, and best of all, they are completely free! They also allow you to register up to 5 different domain names (all of the type: whateveryouchoose.no-ip.com, or whateveryouchoose.sytes.net, etc...).

I really think this might help you out! Now, if you are running apache on your home machine, you can just set it up to listen on a different port. If your ISP blocks the regular port 80, you can just listen on something else (like 8080, or whatever you feel like, within reason).

Let me know if it works out for you, maybe i could offer some more help...

(I have always used them because I am too lazy to memorize my IP every time i log in, and i often want to access files on my box from somewhere else. No problem, just remember this: MyName.sytes.net. Now I can get to my stuff no matter where i am! :)

edrabs 11-29-2003 12:40 PM

OK, I am trying to configure my apache to listen to different ports, but when I edit my httpd2.conf to this.....

#BindAddress *
<IfDefine APACHEPROXIED>
Listen 8080
</IfDefine>

<IfDefine APACHEPROXIED>
Listen 2525
</IfDefine>

<IfDefine !APACHEPROXIED>
Listen 80
</IfDefine>

......and then I try to access my page with
http://localhost:2525
or
http://localhost:8080

I recieve the message that the connection was refused, but when I do
http://localhost:80
everything works correctly.

Thanks in advance

jux 11-29-2003 08:39 PM

ok, my little knowledge

Comcast doesn't block ports, yay for me!
If you have a router, you will need to forward the port for people outside of your network to access it.
i like dyndns.org. but no-ip.com is nice too.
make sure you didn't set up a firewall that blocks those ports

edrabs 12-05-2003 08:58 PM

I DID IT!!!!

Thank you all for your help....the linux community rocks..

The final problem that I had was that I had to forward the http traffic from my router to my linux box, and boom, it just started working!

Thanks again

cb9fl 12-05-2003 11:06 PM

Also when I was looking for a dynamic dns fowarding site some companies offered automatic port forwarding. So you could set up your website locally on say 8034 and tell the dyndns site this. Then when a regular user tried to access your site by opening IE or the likes which automatically looks at port 80 your dyndns site would automatically forward that to the port you are using.

Tha would make the dyndns and port forwarding completely transparent and fool the cheap isp.


All times are GMT -5. The time now is 03:53 PM.