LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   apachectl (https://www.linuxquestions.org/questions/linux-software-2/apachectl-54591/)

sopiaz57 04-11-2003 12:48 PM

apachectl
 
Hey everyone, im new here and im very pleased to have a board like this. Ive peformed a few searches but didnt find much relating to my problem.

Basically, im running RH8 with apache Apache/2.0.40 (Red Hat Linux)


I simply want to restart the server since i made some changes to the .conf file, but that seems to be giving me trouble. From what i thought, you just implement the command , "apachectl -restart"

however, when i goto my apachectl script, i try running it and i get this error:

[root@localhost sbin]# apachectl
bash: apachectl: command not found


Can someone help me out? thanks very much

-N~

trickykid 04-11-2003 12:50 PM

Its probably not in your $PATH..

Have you tried /sbin/apachectl ?

Or maybe with a ./ in front of it.. ? ./apachectl

sopiaz57 04-11-2003 01:10 PM

thanks man, how do i add /usr/sbin to my path?

is it SET $path = /usr/sbin ??

also, ./apachectl works, but i get this for output:



./apachectl -k restart
Syntax error on line 116 of /etc/httpd/conf.d/ssl.conf:
SSLCertificateFile: file '/etc/httpd/conf/ssl.crt/server.crt' does not exist or is empty

im not running any ssl or anything like that so im not sure whats up.

thanks

notsoevil 04-11-2003 03:22 PM

If BASH is your shell, you can add to your path (effective after re-logging in) by editing your .bash_profile in your home directory, appending the needed information. For example, you might see a line there like this:

PATH=$PATH:$HOME/bin

So, you'll want to make it look like this:

PATH=$PATH:$HOME/bin:/usr/sbin

It should be obvious what to do about the error because it points you to the offending line. Edit the file and comment out (eg: prepend the line with a '#' mark) that SSLCertificateFile directive.

Also, you should always run 'apachectl configtest' before trying to restart httpd.

sopiaz57 04-11-2003 04:00 PM

Thank you. So if i wanted to add to the $PATH for not only myself but all users of the system, could i edit the /etc/profile file?

thanks in advance guys.

pablob 04-11-2003 06:11 PM

Sure.


All times are GMT -5. The time now is 05:54 PM.