Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to setup a simple web server (Read 12404 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to setup a simple web server

Does anyone know how to setup a simple web server on a home pc.  So I can buy a domain name from easyspace and have the user directed to the webpage stored on my computer at home.

I have a linksys router defsr41, which might make things easier, or maybe harder

Thanks in advance

How to setup a simple web server

Reply #1
The easiest webserver to install and setup is probably Microsoft IIS (It's maybe already installed in your PC)

The problem of using it is that it's packed with security holes, so sooner or later your PC may end up hacked.

I personally use Apache 2.0. Configuring is kind of a PITA (editing a text file instead of relying on a GUI), but it's very stable and, once configured, you can more or less forget about it.

I also use dyndns.org for domain services (rjamorim.dyndns.org) and the DynSITE software for automatic IP updating (since I'm on dynamic DNS).

My router is an Alcatel Speed Touch Pro. All I need to do is open port 8080 through NAT setup, so that incoming connections can be routed to the server.

Regards;

Roberto.

How to setup a simple web server

Reply #2
There are a lot of free web servers.

Many are a lot easier to handle than Apache.

There are also quite a few that run under Windows instead of Linux.

Basically you need to pick one, though.  That'll depend on what you need from it and what OS.

There are simply too many to list.  Some are very simple, some are more complicated but have more features.  And some, like apache, you need a phd to even read the directions.

Some are professional packages that cost a fee.  Some are professional packages that are free for personal use.  Some (many) are open source and are a hobby for somebody.  Some are open source but are more profession.

It just depends on what you need, what OS, etc. etc.  Go through Google etc. for free web servers.

(For the record, I've done a few small ones on my home setup.  Just for personal stuff, and so I could play and deal with a few programs that insisted on going to the web and checking a site.  There for a while I used Savant, on sourceforge, because it was pretty easy to set up.  It may not do what you want, though.)

There are some other issues...

1) do you have a static or dynamic IP address?  If it's dyname you may need to run a small utility program to constantly inform your domain parker of your IP address so they can redirect stuff to you.  Not every domain place does that.  (Incidentally, there are places that can do 'sub-domains' over dynamic IP, so you don't even need to buy a domain in order to have your own web server.  That might give you practice before buying a domain.)

(Even if it's static, it may not be "static", like with a business.  It might change every few weeks or when the power goes off, etc.)

2) What does your ISP say about you doing a web server.  Many will flatly refuse to allow any sort of web or ftp server.  Even for personal use.  It may have conditions in your terms of service that says they can disconnect you if they find out.

How to setup a simple web server

Reply #3
OK, I have win2k.  I know its possible to setup an ftp server using the linksys router I have, but don't know if its possible to setup a web server using it.  Also, I have a dynamic IP address

what would be the best option for me ???

How to setup a simple web server

Reply #4
Quote
OK, I have win2k.  I know its possible to setup an ftp server using the linksys router I have, but don't know if its possible to setup a web server using it.  Also, I have a dynamic IP address

what would be the best option for me ???

try http://www.aprelium.com/ for the easy web server. (as for the dynamic ip, no problemo, as rjamorim mentioned check dyndns.org, btw some routers allready support ip updating, so you wont need additional utility for that if your linksys is one of them.)
PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung

How to setup a simple web server

Reply #5
I can configure the following in my router.  Will any of them help:

1. DHCP
2. Filters
3. Forwarding
4. Dynamic routing
5. Static routing
6. DMZ Host
7. MAC address clone

Thanks for all the help.  I am taking a look at that link right now

How to setup a simple web server

Reply #6
It's probably "forwarding"

Look if it's a screen with options like "port", "outside address", "inside address" and "protocol" (protocol is either TCP or UDP).

How to setup a simple web server

Reply #7
Yes, this is the description given in the "forwarding" option:

Port forwarding can be used to set up public services on your network. When users from the Internet make certain requests on your router, they will be redirected to the specified IP

And it allows the following to be set:

1. Ext.port
2. Protocol TCP
3. Protocol UDP
4. IP address

and

5. UPnP forwarding
6. Port triggering

Heres a screenshot

How to setup a simple web server

Reply #8
That's it!

Now, set up one of the entries like this:

In the "Customized Applications" box, enter something like HTTP server. That's just a reminder.

In Ext. Port, use 80 (default HTTP port) - or the custom port you set up in the server app - in the first box.

Use either 0 or 80 in the second box (I don't know which is the correct one), as you don't want to open port ranges.

Select protocol TCP

In the IP address box, complete the IP of the machine that will be running the server. If it's the only machine in the network, it's probably .1

And then enable and apply.

Good luck

How to setup a simple web server

Reply #9
Thanks for the advice, looks like your help is getting me somewhere

But there is something I don't understand.  How do I link a webpage to the IP address I am going to use, as I don't want to give access to all of my harddrive

Do I have to put the webpage in a specific directory, or does that part involve other software ???

I think windows 2000 comes with IIS, does that have to be used ???

Thanks again

[EDIT - what does the user have to type in to get to my future web page ]

How to setup a simple web server

Reply #10
Quote
Thanks for the advice, looks like your help is getting me somewhere

Good to know

Quote
But there is something I don't understand.  How do I link a webpage to the IP address I am going to use, as I don't want to give access to all of my harddrive

Do I have to put the webpage in a specific directory, or does that part involve other software ???


Well, I can only guide you regarding Apache, since that's the http server I use.

In the Apache config file (httpd.conf), there's a section where you set up the Document Root. In my case, it looks like this:

Code: [Select]
DocumentRoot C:\Net_files_root


More info:
http://httpd.apache.org/docs-2.0/mod/core....ml#documentroot

Quote
I think windows 2000 comes with IIS, does that have to be used ???


Nope. IIS is Microsoft's server, and it's very insecure. Therefore, it's not recommended at all.

Quote
Thanks again


Anytime

Quote
[EDIT - what does the user have to type in to get to my future web page ]


Create an account at www.dyndns.org. From the account, you'll be able to create a domain for you (services page -> "Dynamic DNS" -> Add A Host) - something like jen.dyndns.org (although that one is probably already taken  )

Mine is rjamorim.dyndns.org (but the server is down ATM)

Also, you can create hosts for several different domains, like something.kicks-ass.org and something.is-a-geek.com.

How to setup a simple web server

Reply #11
So basically,

1. I get the router to forward any internet traffic (port 80) to the IP address 192.168.1.1

2. I then signup with jen.dyndns.org (as you said, its most likely already taken ) and get an account which will connect to my IP address 192.168.1.1

3. Then I somehow create a web directory which will load each time that IP address is called by dyndns

Is that right.

Looks like I will have to do some reading up on creating a web directory. I think

If I have any problems, I will post here, if you don't mind

How to setup a simple web server

Reply #12
Quote
1. I get the router to forward any internet traffic (port 80) to the IP address 192.168.1.1

Right. Some ISPs block port 80, among others, since these are pretty common server ports. In this case, choose some other number.

Quote
2. I then signup with jen.dyndns.org (as you said, its most likely already taken ) and get an account which will connect to my IP address 192.168.1.1


Not really. The dyndns account will connect to the IP address set up by your ISP, that is the Router's IP address.

Then, the router will take these incoming packets and forward them to your machine's IP address (in this case, 192.168.1.1).

That's the purpose of the forward setting in the router. In the case you had several machines being served from the same router, you could use one as FTP server (forwarding the ports 21 and 20 to it), other as HTTP server (forwarding port 80), another as SSH server (port 22)...

Quote
3. Then I somehow create a web directory which will load each time that IP address is called by dyndns


Right. Create a folder in your HDD, configure Apache to use it as your root folder, and put up an index.html that will be the home page.

Quote
Looks like I will have to do some reading up on creating a web directory. I think


Yes. There's a lot of quite useful info at the apache documentation.

Also, even though someone said setting up apache is hard, I don't think it's so nightmarish. Each option is well explained, and if you don't understand something you should better leave it alone. The defaults are pretty safe.

Just make sure to set up your root folder and the port.

Quote
If I have any problems, I will post here, if you don't mind


No problem

Also, you can contact me through mail and any of the IMs found at my profile.

Good luck;

Roberto.

How to setup a simple web server

Reply #13
Hi

I too run a web & ftp server through dyndns.org - in my opionon the best free dns service.
You will have to sign up for one of their free dns accounts, plus you will need to run a service updater which updates your account with your present IP - since your IP in dynamic service is always switching that program will keep the www.jen.dyndns.org directed at your IP. The one I use is called DirectUpdate and is also great. They list a few others on the dyndns.org website I believe, but this one has always worked well for me.

BTW - your WAN IP is not 192.168.1.1 - that is your LAN IP given by the Linksys, your WAN IP is given by your ISP and is dynamic within the range the ISP dictates for your service & area

You can check out this site http://www.diywebserver.com/whatyouneed.html which has a fair bit of info if your starting

I run apache instead of IIS - i trust apache more and it is more widely used. there are tutorials around on the apache website and other places how to set it up

1) in the linksys setup menu go to the 'advanced' -> 'Forwarding' -> 'UPnP Forwarding', you will see a listing for HTTP Port 80 - put in your computers IP (192.168.1.1 - i assume) and check the box to enable port 80 - web connections

2) see above

3) when you install apache it will direct you where to create the root folder

The link above has a quick guide to setting up apache as well

So what can we expect to find on jen.dyndns.org?

How to setup a simple web server

Reply #14
Quote
...So what can we expect to find on jen.dyndns.org?

@rjamorim - I can't thank you enough for your help.

@TwoJ - I am not completely sure whats gonna be on the web site, we'll have to wait and see  Thanks for your help

My plan is to read up on apache tomorrow, and maybe even start configuring

How to setup a simple web server

Reply #15
If you are still open to suggestions, I recommend you to take a look at Sambar server. I've had it for a while now and it's pretty simple and straightforward to configure (w/ GUI and all). Since it has been visited only seldom by people other than myself, and therefore I have only seen it handle very light traffic, I can't really vouch for its stability, but I have never had any problems with it otherwise. There is not much I can say about security for the same reasons, but by following the security tips on the Sambar's website, I don't think there should be any issues, since I sincerely doubt some high-level hacker will want to break into my computer and its humble contents.
It might also be a good time to take a look at it, since the production release of version 6.0 should be out any day soon.

How to setup a simple web server

Reply #16
LOL .... comparig my profile with rjamorim's its exactly the same, with the exception of the router model ( D-Link DI 614 WLAN/LAN router ) and the fact i had paid 20 US$ to dyndns.org once to handle my wiesneronline.net domaine name  .....

How to setup a simple web server

Reply #17
I decided to download apache today.  Started the installation and ran into a problem.  This screen came up.  I don't know what to type ???

How to setup a simple web server

Reply #18
I think it should be

Network Domain: jen.dyndns.org
Server Name:      www.jen.dyndns.org
email:                you can choose whatever email you want (ie jen@hotmail.com, jen@someISP.com  or if you are setting up an email server on that computer you can set up jen@jen.dyndns.org)

of course you will have to substitute jen.dyndns.org to whatever name you signed up for at dyndns.org

You going to start your own forum? (can I be an admin?    )

How to setup a simple web server

Reply #19
Quote
I think it should be

Network Domain: jen.dyndns.org
Server Name:      www.jen.dyndns.org
email:                 you can choose whatever email you want (ie jen@hotmail.com, jen@someISP.com  or if you are setting up an email server on that computer you can set up jen@jen.dyndns.org)

of course you will have to substitute jen.dyndns.org to whatever name you signed up for at dyndns.org

You going to start your own forum? (can I be an admin?    )

Thanks

Can the network domain and server names be changed later on?

I think I should sign up with dyndns first

the webpage is not going to be anything special, to start off with I am hoping to be able to add pictures to it which can be linked to directly using hydrogenaudio.

And then a little latter on, i think i might make some sort of webpage.  If I ever do make my own forum, you can be the lead admin

How to setup a simple web server

Reply #20
Quote
Can the network domain and server names be changed later on?


Yes

Don't forget you'll need to get a program to keep dyndns.org updated with your current IP
My favorite is DirectUpdate

Whoa-Hoa - Top Dog    B) 

 

How to setup a simple web server

Reply #21
I think I have done everything which was said on this thread, but it doesn't work

How to setup a simple web server

Reply #22
C'mon Jen you'll have to do a bit better than "it doesn't work"
You signed up with a dyndns.org account? the IP director is hooked up
you should be able to ping your account just to make sure that the connection is going through.

ie -mine is siq.dyndns.org
if you ping that you should get some responce

So if your connection is up then is the problem with the router/firewall? or with Apache?
next step disable your firewall - take your router out if possible
etc, etc

How to setup a simple web server

Reply #23
I can ping to my one, but not yours ???

I also tried it without the firewall, but it still doesn't work

How to setup a simple web server

Reply #24
If you have another machine on your LAN you can try to connect to the one hosting your server, though http://localhost/ should work too.  You need to determine whether it's the server or the router/firewall that's causing the problem.  Also, a shell account somewhere out on the net can help for testing.  Sometimes "telnet luthor.dyndns.org 80" will get through, but your network provider may be killing all http requests just to be bastards.

Keep trying,


mobius
Gur svggrfg funyy fheivir lrg gur hasvg znl yvir. Jr zhfg ercrng.