LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 05-25-2004, 04:44 PM   #1
flamah
Member
 
Registered: Feb 2004
Location: London
Distribution: FEDORA CORE 2
Posts: 53

Rep: Reputation: 15
Question How do i set up a web server


I am running Fedora core 1 - and i need to know how to set up a webserver - I have no idea of where to even start so any ideas (or how to's) would be brill

Thank you

Darren
 
Old 05-25-2004, 04:53 PM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
Hi there flamah!!!

Of all scary things I've ever done with Linux, setting up a Webserver was the easiest, in fact, it works practically out of the box. Search your Redhat CD's for "Apache" and install it. Apache is a webserver, dare I say the most used world-wide? Certainly .

Once installed, as root, run apache:

Code:
apachectl start
that will start apache server. You stop the sever, well, by using "stop" instead of "start". If you open your browser now and type:

http://localhost

you will see a Welcome screen of Apache saying everything is working. You can substitute localhost for your IP address. That means that anyone with a Webbrowser who types: http://your_ip_address will hit your server and see your page . Pretty cool huh?. To change the page that is show at the local host, edit the "index.html" (or place your page) at /var/www/html (this may change slightly from one distribution to another, but it usually is at /var/www).

Later, when you have your homepage set up, you will might want to learn about DNS to use some cool addresses instead of your IP.

From there on, it's up to you setting up databases, php, and up to where you want it to be
 
Old 05-25-2004, 05:47 PM   #3
np complete
Member
 
Registered: May 2004
Distribution: Fedora Core 2/3
Posts: 51

Rep: Reputation: 15
also, since it seems fairly common nowadays for everyone to be behind a router, make sure you have port 80 open and set to redirect to your specific computer if you have more than one. otherwise, you will only be able to see your website when you type in localhost, and no one on the outside who types in your IP will be able to see your website (or you for that matter)

if you don't have a router, ignore my post

Last edited by np complete; 05-25-2004 at 05:48 PM.
 
Old 05-25-2004, 06:02 PM   #4
flamah
Member
 
Registered: Feb 2004
Location: London
Distribution: FEDORA CORE 2
Posts: 53

Original Poster
Rep: Reputation: 15
well i installed it but i cant start it it says.....
bash: apachectl: command not found

Darren
 
Old 05-25-2004, 06:23 PM   #5
np complete
Member
 
Registered: May 2004
Distribution: Fedora Core 2/3
Posts: 51

Rep: Reputation: 15
i see you are running RH9.

try going to your RedHat menu > System Settings > Server Settings > Services

Scroll down until you see "httpd" put a little check in the box for it to start when your system boots up, and you should also try hitting the "restart" button to restart the web server services

have you rebooted your system since installing apache? might want to give that a try

Last edited by np complete; 05-25-2004 at 06:24 PM.
 
Old 05-25-2004, 06:24 PM   #6
flamah
Member
 
Registered: Feb 2004
Location: London
Distribution: FEDORA CORE 2
Posts: 53

Original Poster
Rep: Reputation: 15
im running fedora core 1 - not rh9 but its very similer i think but i will try that anyway
 
Old 05-25-2004, 06:25 PM   #7
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
hmmmm, assuming that you are root, type:

Code:
apache
then press "TAB" after apache _not_ return. A list of possible executables of apache will be shown. Maybe you start apache with a different command like "apachetl" or, I don't know . Whatever you find try "apachexxx start". Here's a quick link:

http://httpd.apache.org/docs/invoking.html

good luck!
 
Old 05-25-2004, 06:27 PM   #8
flamah
Member
 
Registered: Feb 2004
Location: London
Distribution: FEDORA CORE 2
Posts: 53

Original Poster
Rep: Reputation: 15
ok that worked - thank you
 
Old 05-25-2004, 06:29 PM   #9
np complete
Member
 
Registered: May 2004
Distribution: Fedora Core 2/3
Posts: 51

Rep: Reputation: 15
Quote:
Originally posted by Megaman X
hmmmm, assuming that you are root, type:

Code:
apache
then press "TAB" after apache _not_ return. A list of possible executables of apache will be shown. Maybe you start apache with a different command like "apachetl" or, I don't know . Whatever you find try "apachexxx start". Here's a quick link:

http://httpd.apache.org/docs/invoking.html

good luck!
i believe the command is
Code:
apachectl
not
Code:
apachetl
 
Old 05-25-2004, 06:31 PM   #10
flamah
Member
 
Registered: Feb 2004
Location: London
Distribution: FEDORA CORE 2
Posts: 53

Original Poster
Rep: Reputation: 15
can you comfirm that you get a page please -

http://217.42.254.3/
 
Old 05-25-2004, 06:35 PM   #11
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
thanks np complete!

flamah, I'm getting a time out error . Maybe you should follow np complete advices if you are behind a firewall
 
Old 05-25-2004, 06:36 PM   #12
np complete
Member
 
Registered: May 2004
Distribution: Fedora Core 2/3
Posts: 51

Rep: Reputation: 15
after 3 minutes, it still cannot resolve your IP in the browser. I tried running a ping on your IP and was able to get a response. Are you on dial-up? Behind a firewall?
 
Old 05-25-2004, 06:36 PM   #13
flamah
Member
 
Registered: Feb 2004
Location: London
Distribution: FEDORA CORE 2
Posts: 53

Original Poster
Rep: Reputation: 15
ok try now
 
Old 05-25-2004, 06:37 PM   #14
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
Up and running now . Congratulations man!
 
Old 05-25-2004, 06:37 PM   #15
np complete
Member
 
Registered: May 2004
Distribution: Fedora Core 2/3
Posts: 51

Rep: Reputation: 15
bingo. and loaded quickly too!

congrats!
 
  


Reply



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
How do I set up a web server? txprogrammer Linux - Newbie 6 08-26-2005 06:47 AM
how to set up a web server?? snakeo2 Linux - Newbie 12 07-07-2004 09:14 PM
how to set up a web server sameermanagoli Linux - General 1 06-26-2003 08:35 PM
How to set up a web server with pc Z28kid Linux - Newbie 13 01-16-2003 09:13 AM
Set up Web Server? lax2sman Linux - Newbie 3 02-11-2002 10:09 PM

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

All times are GMT -5. The time now is 06:50 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
Open Source Consulting | Domain Registration