LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 08-25-2010, 03:55 PM   #1
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Rep: Reputation: 33
Start/stop apache - slackware


Help I am lost. I configure my apache and can run http://localhost. There "I see it works!" but if I try to stop apache I get message that httpd is not started. I run

apachectl start - ok
but when I run apachectl stop it says "httpd (no pid file) not running"

I need to stop apache, because this is my dev machine and I want to start apache only when I make changes to my site. I am with slackware13.
 
Old 08-25-2010, 05:20 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,523

Rep: Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502
Search for the file httpd.pid (default location is under /var/run/httpd). Edit httpd.conf and check if you have a line:
Code:
Pidfile /var/run/httpd/httpd.pid
If it doesn't exist you can add it towards the beginning of httpd.conf and try to use "apachectl stop".

You can also use any of the following to stop apache:
Code:
pkill httpd
killall -9 httpd
Regards
 
Old 08-26-2010, 03:39 PM   #3
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 33
I try with

Code:
apachectl stop
but it didn't work.

When I restart the computer now I can't start it. Try

Code:
/etc/rc.d/rc.httpd start
apachectl start
No error message appear, but can't load localhost...
 
Old 08-26-2010, 03:53 PM   #4
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 33
Here is error_log

Code:
root@darkstar:~# tail /var/log/httpd/error_log 
[Thu Aug 26 22:42:09 2010] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "darkstar"                                                       
Configuration Failed                                                                      
[Thu Aug 26 22:44:21 2010] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "darkstar"                                                       
Configuration Failed                                                                      
[Thu Aug 26 22:48:13 2010] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "darkstar"                                                       
Configuration Failed                                                                      
[Thu Aug 26 22:49:23 2010] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "darkstar"                                                       
Configuration Failed                                                                      
[Thu Aug 26 22:49:39 2010] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "darkstar"                                                       
Configuration Failed
I found the pproblem. I had to add my hostname in /etc/hosts file:

Code:
127.0.0.1    localhost hostname

Last edited by konzo; 08-26-2010 at 04:38 PM.
 
Old 08-27-2010, 08:03 AM   #5
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
It soudns like you've got it solved, but a better way to start and stop Apache in Slackware is by using /etc/rc.d/rc.httpd

Code:
/etc/rc.d/rc.httpd start

/etc/rc.d/rc.httpd stop

/etc/rc.d/rc.httpd restart
 
  


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
Apache Webserver on Slackware - Failed to Start Apache - 'no listening sockets .." CCTVGuru Linux - Server 4 10-11-2009 02:14 AM
Informix start/stop along with redhat start/stop gxgtudor Red Hat 2 03-06-2009 03:13 AM
AWK- processing data inside start/stop pairs but ignoring start/stop lines cliffoij Programming 2 10-15-2008 07:17 AM
Mysql - Howto intall,set up,start and stop in Slackware 12. matruschka LinuxQuestions.org Member Success Stories 1 08-13-2008 03:52 AM
Troubles In Apache: I can neither start nor stop it sanmartin Linux - Software 5 03-06-2005 09:58 AM


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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration