LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-22-2003, 01:19 PM   #1
Trinity22
Member
 
Registered: Jul 2003
Location: oregon coast
Distribution: Fedora Core 3
Posts: 280

Rep: Reputation: 30
newbie webserver queries.


Hey, I just did a search for this and didn't find anything answering this, so please don't crucify me .

I'm interested in starting the process required to have my computer be a webserver (hosting my small 30mb website). A few questions though.

1). I've heard that before you can have your computer be a webserver (at least for a website) you have to have 2 static IP's from your ISP. Is this true? Would I be okay with just the one I have now? I am running cable 'net.

2). Is there a tutorial for starting a webserver that I don't know of because I haven't been in the linux community very long?

3). How rabid must one be in securing the server? Would a firewall work or is there lots more that goes into the process?

well those are my questions, hoping someone can answer one or all or at the very least provide me with url's.....

thank you,
trinity
 
Old 08-22-2003, 01:31 PM   #2
jdruin
Member
 
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313

Rep: Reputation: 30
1). I've heard that before you can have your computer be a webserver (at least for a website) you have to have 2 static IP's from your ISP. Is this true? Would I be okay with just the one I have now? I am running cable 'net.

You need one IP. It helps if it is static. If have a cable modem, you may already have a static IP. You can go into your router setup and click on 'refresh DHCP' which will cause the router to hot the cable company and try to get a new number. If it comes back the same number. You probably have a static IP. Cable companies say they dont give static IP's. But this is a legal issue. Mine has ben the same for 4 years.

If you dont have a router, check you IP and the lease time on it using IFCONFIG. When the lease time is up, check to see if it renews to be the same number. If so, you may have a static IP. Unless the cable company claims it to be static, they can change it at any time without telling you so its up to you to deal with that.



2). Is there a tutorial for starting a webserver that I don't know of because I haven't been in the linux community very long?
The webserver you will find the most documentation on is Apache. O'Reilly has a very easy to read primer on Apache that is writen for newbies. It is called, strangely enough, Apache. www.oreilly.com. You can find tons of info by googling apache as well. http://www.apache.org/

3). How rabid must one be in securing the server? Would a firewall work or is there lots more that goes into the process?

A firewall helps keep the box from getting hacked. It does nothing for the webserver. Ask yourself, if the box got hacked, what is the worst that could happen. For me the answer is I would havce to reload to OS and reinstall all my backup files such as configurations which I have on CD. Not bad. So I dont sweat it too much. If you have personnal or damaging info on the box, you cannot take security too seriously. The book Maximum Linux Security is a newbie to intermediate level book that will teach you tons about OS's, Linux, and also security.
 
Old 08-22-2003, 01:38 PM   #3
martinman
Member
 
Registered: Apr 2003
Distribution: Gentoo 1.4
Posts: 290

Rep: Reputation: 30
this should help TONS. it doesnt explain much, like other tutorials, but it is straight and to the point, only a page long. It deals with configuring a LAMP setup on your webserver.

LAMP=Linux, Apache, MySQL, PHP

All of which you will need, I'm assuming

http://www.mkaz.com/reference/php/setup_linux.html

also, you only need one static IP, and as long as you open port 80 to your box through a router (again, asssuming you have one), the world will be able to see your page.

About security...DONT be a fool and use your main desktop/laptop/workstation for a webserver. If you did, chances are a hacker would have a LOT more to exploit and fiddle with, e.g. mounted drives, other networked computers, etc. jdruin was right, think "what is the worst that can happen?"
 
Old 08-22-2003, 01:53 PM   #4
Trinity22
Member
 
Registered: Jul 2003
Location: oregon coast
Distribution: Fedora Core 3
Posts: 280

Original Poster
Rep: Reputation: 30
thank you for the help so far

well i only have one computer so yeah i was hoping to turn this computer into one to host my page or at least host more files. is the security particularly hard to learn or implement? i'm not afraid of hard work, just that saving $100+ a year in webhosting fees is a tempting lure.

okay here's an extreme newbie question, how would i go into router config or even run IFCONFIG. I tried in the command line just for kicks and got nothing so i'm literally scratching my head.

and what is a router? I'm connected to the net via Ethernet and my Webstar cable modem.

trinity
 
Old 08-22-2003, 02:44 PM   #5
figadiablo
Member
 
Registered: Feb 2002
Location: Virginia USA
Distribution: Slackware, CentOS, Fedora
Posts: 342

Rep: Reputation: 30
Quote:
Originally posted by Trinity22


and what is a router? I'm connected to the net via Ethernet and my Webstar cable modem.

trinity
Then there is no router between you and the ISP.

A router (in very easy to understand words) is a device that comunicates or directs network trafic. In other words a router helps you get from point A (your house) to Point B (maybe www.linuxquestions.org) in the internet .
Routers are used to connect private LANs (Local Area Networks; example is a home network) to the internet. In this case they are also called a "gateway" because it is the point where all the traffic has to go through to be able to acces the internet or another networks.
In very basic words, a router conects networks together.

You can go to CompUSA and buy a cheap router (Linksys, Netgear); set up two or three computers at home in a Network, and be able to share the internet connection between them with the router.

Hope this helps
Figa
 
Old 08-22-2003, 03:04 PM   #6
jdruin
Member
 
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313

Rep: Reputation: 30
I'm connected to the net via Ethernet and my Webstar cable modem.

In that case you do not have a router. Routers are cheap and come in good brands like Linksys and DLink but they require that you learn basic networking priciples to use them effectively. Basically they allow you to direct all web request to one particular computer thus securing the computers from a central point. Since you only have one computer, a router is not neccesary (but would still be useful)


how would i go into router config or even run IFCONFIG. I tried in the command line just for kicks and got nothing so i'm literally scratching my head.

ifconfig is probably not coming up because the path is not set. The path is the location of the executable program. To find out what the path is for ifconfig do:

find / -name ifconfig

THis will produce a result (or more) something like:

/sbin/ifconfig

You can type in the entire path to run the command.

To permanently set a path (in RedHat), make a backup of

/etc/profile

by:

cp /etc/profile /etc/profile.backup

and open the /etc/profile file in a text editor such as pico (ie pico /etc/profile) and add the lines:

pathmunge .
pathmunge /usr/bin
pathmunge /usr/sbin
pathmunge /usr/local/sbin

Put this before the line 'unset pathmunge' (about line 23 or so)

Save the file. Exit and login again. Test by using ifconfig but without the path (so just type ifconfig, not /sbin/ifconfig) and see if the shell finds it.

Good luck
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie needs help for down webserver natcire Linux - Enterprise 13 05-10-2005 08:12 PM
Mandrake Webserver and Other Newbie Questions macgyver007 Linux - Newbie 3 10-29-2004 09:09 PM
Newbie WebServer RussOSU Linux - Newbie 2 03-14-2004 10:46 AM
newbie question: setting up webserver geo_h Linux - Networking 1 09-09-2003 02:20 PM
Webserver newbie...need help... jd121 General 2 09-08-2003 05:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration