LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do i set up a web server (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-set-up-a-web-server-185791/)

flamah 05-25-2004 04:44 PM

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

Mega Man X 05-25-2004 04:53 PM

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 :p. 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 :)

np complete 05-25-2004 05:47 PM

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 :)

flamah 05-25-2004 06:02 PM

well i installed it but i cant start it it says.....
bash: apachectl: command not found

Darren

np complete 05-25-2004 06:23 PM

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

flamah 05-25-2004 06:24 PM

im running fedora core 1 - not rh9 but its very similer i think but i will try that anyway

Mega Man X 05-25-2004 06:25 PM

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!

flamah 05-25-2004 06:27 PM

ok that worked - thank you :)

np complete 05-25-2004 06:29 PM

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
:)

flamah 05-25-2004 06:31 PM

can you comfirm that you get a page please -

http://217.42.254.3/

Mega Man X 05-25-2004 06:35 PM

thanks np complete! ;)

flamah, I'm getting a time out error :(. Maybe you should follow np complete advices if you are behind a firewall ;)

np complete 05-25-2004 06:36 PM

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?

flamah 05-25-2004 06:36 PM

ok try now

Mega Man X 05-25-2004 06:37 PM

Up and running now ;). Congratulations man!

np complete 05-25-2004 06:37 PM

bingo. and loaded quickly too!

congrats!


All times are GMT -5. The time now is 12:01 AM.