Welcome Guest ( Log In | Register )



2 Pages V   1 2 >  
Reply to this topicStart new topic
> Restarting Apache Server
nightfox
post Mar 15 2006, 10:44 PM
Post #1


NiGHTFoX - Hiding in the dark
Group Icon

Group: Members
Posts: 680
Joined: 3-April 05
Member No.: 3,584



I've worked with Apache long enough that I know (or at least I thought I knew) how to restart it. The problem: my terminal is filled with "command not found" and other errors and the such.

httpd restart, right? NOPE! Command not found!
apachectl restart, NOPE! Command not found!

I'm out of ideas! I can't just keep physically re-booting the machine when I need JUST apache to restart! Thanks for any help, my system is Debain 3.1 r1.

[N]F
Go to the top of the page
 
+Quote Post
Houdini
post Mar 15 2006, 11:19 PM
Post #2


Super Member
Group Icon

Group: Members
Posts: 572
Joined: 25-April 05
From: Nashville Tennessee
Member No.: 4,340



/sbin/service httpd reload
Go to the top of the page
 
+Quote Post
mastercomputers
post Mar 16 2006, 05:45 AM
Post #3


PESTICIDAL MANIAC
Group Icon

Group: Members
Posts: 626
Joined: 1-September 04
From: Auckland, New Zealand
Member No.: 27



QUOTE(Houdini @ Mar 16 2006, 12:19 PM) *

/sbin/service httpd reload


Houdini is close but the proper commands you can do is

/sbin/service httpd start
/sbin/service httpd stop
/sbin/service httpd restart

Which restart is is the one you've after, can only be performed by root or a super user.

I usually do:

su -c "/sbin/service httpd restart"

Which is similar to sudo but I feel is much better to use than sudo, it may not work with some older distributions.


Cheers,


MC
Go to the top of the page
 
+Quote Post
XIII
post Mar 16 2006, 06:27 AM
Post #4


Advanced Member
Group Icon

Group: Members
Posts: 190
Joined: 16-February 06
From: Egypt
Member No.: 11,326



QUOTE(Houdini @ Mar 16 2006, 08:19 AM) *

/sbin/service httpd reload


i think that depends on the version, right?
for me it works when i type:
CODE
sudo /etc/apache/apachectl restart

i think this is because my apache version is 1.3, right?
Go to the top of the page
 
+Quote Post
yordan
post Mar 16 2006, 06:09 PM
Post #5


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 2,242
Joined: 16-August 05
Member No.: 7,896
myCENTs:56.55



QUOTE
i think that depends on the version, right?

Really depends on version.
On my system I have to do
cd $ORACLE_HOME/Apache/Apache/bin
./apachectl stop
./apachectl start

sounds rather different, isn't it ?
Go to the top of the page
 
+Quote Post
XIII
post Mar 17 2006, 10:34 AM
Post #6


Advanced Member
Group Icon

Group: Members
Posts: 190
Joined: 16-February 06
From: Egypt
Member No.: 11,326



QUOTE(yordan @ Mar 17 2006, 03:09 AM) *

Really depends on version.
On my system I have to do
cd $ORACLE_HOME/Apache/Apache/bin
./apachectl stop
./apachectl start
sounds rather different, isn't it ?


Nope, it's the same mate, as it's the same command, me too i can do it directly by ./apachectl restart or stop then start, i meant the difference is wither it's httpd, apache 1.34 or apache2, that's what i meant smile.gif
Go to the top of the page
 
+Quote Post
OpaQue
post Mar 17 2006, 04:10 PM
Post #7


Administrator
Group Icon

Group: Admin
Posts: 467
Joined: 26-August 04
Member No.: 1
myCENTs:85.82



Try these.

1. service apache restart
2. /etc/init.d/httpd restart
Go to the top of the page
 
+Quote Post
nightfox
post Mar 18 2006, 10:42 PM
Post #8


NiGHTFoX - Hiding in the dark
Group Icon

Group: Members
Posts: 680
Joined: 3-April 05
Member No.: 3,584



I don't get this... I've tried every command you guys have given and none of them work!

service apache restart gives me: "bash: service: command not found"
/etc/init.d/httpd restart gives me: "bash: /etc/init.d/httpd: No such file or directory"
/etc/apache/apachectl restart gives me: "/etc/apache/apachectl: No such file or directory"
/sbin/service httpd reload gives me: "/sbin/service: No such file or directory"

hmm... I don't know... the file structure seems to be normal.
var/www contains all of the default documents, etc/apache2 seems to have everything normal. Is there a way I could go about uninstalling Apache and re-installing it?

[N]F
Go to the top of the page
 
+Quote Post
mastercomputers
post Mar 19 2006, 12:57 PM
Post #9


PESTICIDAL MANIAC
Group Icon

Group: Members
Posts: 626
Joined: 1-September 04
From: Auckland, New Zealand
Member No.: 27



OK then, give us the important information that we need.

What distribution are you running? What version of Apache do you have installed?

Going by what you've said you say you've got Apache2, in /etc/Apache2, that sounds like Debian or a variant of it.

So the command that you will need to use is

/etc/init.d/apache2 restart

or

apache2ctl restart

For the apache2ctl command, If it returns command not found, do:

which apache2ctl

And it will show paths of where this command could exist, then you would do /path/to/apache2ctl restart


Cheers,


MC
Go to the top of the page
 
+Quote Post
bakr_2k5
post Sep 25 2006, 02:45 PM
Post #10


Member - Active Contributor
Group Icon

Group: Members
Posts: 83
Joined: 25-September 06
From: The Netherlands
Member No.: 16,153



QUOTE(nightfox @ Mar 16 2006, 12:44 AM) *

I've worked with Apache long enough that I know (or at least I thought I knew) how to restart it. The problem: my terminal is filled with "command not found" and other errors and the such.

httpd restart, right? NOPE! Command not found!
apachectl restart, NOPE! Command not found!

I'm out of ideas! I can't just keep physically re-booting the machine when I need JUST apache to restart! Thanks for any help, my system is Debain 3.1 r1.

[N]F


Hi nightfox,

try this command as root:
CODE
httpd -k restart


bakr_2k5

<edit>
Uh yes sorry about that, kinda old thread but anyway didn't know if the problem was gone wink.gif
</edit>

This post has been edited by bakr_2k5: Sep 25 2006, 02:49 PM
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Linux Server & Cpanel Alternatives ?(7)
  2. Dial In Server On Rh Linux 9.0(0)
  3. How Can Samba Server Works With Firewall?(3)
  4. Linux/unix For My Purpose(2)
  5. Linux Server Routing Failed!(0)
  6. Need Help With Apache Configuration Problems(3)
  7. Help: Dns Server Auto Updataion(0)
  8. Redhat 8.0 + Evolution + Ms Exchange Server(8)
  9. Having Trouble Deciding Linux Distro For My Dad(14)
  10. Suse Linux Enterprise Server 9(5)
  11. Binds ( Dns Server For Linux ) - How To Use It ?(2)
  12. Re-configure X Server(2)
  13. CentOS: Test Server Reporting Errors!(5)
  14. Apache Virtual Hosts(2)
  15. Fedora Directory Server(0)
  1. Build Your Own Server(10)
  2. Simple Ubuntu Based Home File Server | For Newbies(1)


 



- Lo-Fi Version Time is now: 5th December 2008 - 12:53 PM