LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-17-2003, 02:17 AM   #1
pcdebb
Member
 
Registered: Aug 2003
Location: Brandon, FL
Distribution: Mageia 2
Posts: 81

Rep: Reputation: 15
Unhappy is apache running?


I'm trying to setup apache. i'm assuming that it's installed with the install, but when i read up on apache's site, it references different places for where files should be (could be a Fedora thing). How do I even know if apache is running? I try to run the command to restart it, but it says command not found (i'm running as su/root) but the file is in fact there with correct permission.
 
Old 12-17-2003, 02:34 AM   #2
Berng
Member
 
Registered: Dec 2003
Location: Siberia,Russia
Distribution: Basically RedHat
Posts: 34

Rep: Reputation: 15
1) ps -ax | grep httpd
should show you if your appache running, and as how much processes.
It will list all httpd processes (wich usually corresponds to apache)
to rearun you shold look at /etc/rc.d/init.d directory for httpd file, usually it is apache daemon control, or try to find apache_ctrl file in /usr/bin, /usr/local/bin, /usr/local/sbin folders, it should be the same file, run as apache_ctrl start or apache_ctrl stop
Best Regards,
Oleg.
 
Old 12-17-2003, 03:08 AM   #3
pcdebb
Member
 
Registered: Aug 2003
Location: Brandon, FL
Distribution: Mageia 2
Posts: 81

Original Poster
Rep: Reputation: 15
thanx for the reply, the file is located in /usr/local/sbin but it was called apachectl. I've since booted out of linux but have written this down and will do when i reboot back into it. i had to setup some virtuals and was at least trying to test localhost in the browser but it wouldnt show up. I'm getting there tho :-)
 
Old 12-17-2003, 03:16 AM   #4
Berng
Member
 
Registered: Dec 2003
Location: Siberia,Russia
Distribution: Basically RedHat
Posts: 34

Rep: Reputation: 15
Do the
ps -ax | grep httpd
command shows something?
If not, try to start apachectl by hands:
/usr/local/sbin/apachectl start
If it does not shows any errors, go to the /usr/local/etc or /usr/local/etc/conf, there should be httpd.conf file, Look there for DocumentRoot parameter, it shows you the path to your html directory, check if this direcotry exists and restart apache:
/usr/local/sbin/apachectl stop
/usr/local/sbin/apachectl start
Check if server is running:
ps -ax | grep httpd
if you see lines like
521 ? S 488:10 /usr/local/sbin/httpd
your server should work...
Best Regards,
Oleg.
check
 
Old 12-17-2003, 03:20 AM   #5
pcdebb
Member
 
Registered: Aug 2003
Location: Brandon, FL
Distribution: Mageia 2
Posts: 81

Original Poster
Rep: Reputation: 15
Berng, I tried the command of "apachectl start" and it told me command not found. I was actually in the directory itself and the file was there, so I don't know why it was telling me that. I was logged in the terminal as root so permissions should not have been the problem. When I get up in the morning I will give it a try again as it is bedtime for this chick
 
Old 12-17-2003, 03:24 AM   #6
Berng
Member
 
Registered: Dec 2003
Location: Siberia,Russia
Distribution: Basically RedHat
Posts: 34

Rep: Reputation: 15
if you are in the directory /usr./local/sbin,
use call
./apachectl
instead of simple
apachectl
call, or use full path:
/usr/local/sbin/apachectl
Best Regards,
Oleg.
 
Old 12-17-2003, 03:26 AM   #7
pcdebb
Member
 
Registered: Aug 2003
Location: Brandon, FL
Distribution: Mageia 2
Posts: 81

Original Poster
Rep: Reputation: 15
argggg!!!! ./apachectl probably will work, and to think i learned that in class!!
 
  


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
Failed to start apache : Apache does not appear to be running : number11 Slackware 9 02-11-2005 10:51 AM
How to tell what Apache is running as? cadkins Linux - Newbie 2 11-09-2004 12:06 PM
Building and Running Apache j03 Mandriva 8 12-21-2003 02:32 PM
running apache gtgoku Slackware 1 10-29-2003 09:05 PM
Running Apache Ruth Linux - General 6 03-26-2001 07:24 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:56 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