LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   trying to start apache (https://www.linuxquestions.org/questions/linux-newbie-8/trying-to-start-apache-786817/)

casperdaghost 02-03-2010 08:36 PM

trying to start apache
 
start apache - and get this error message.

casper@casper-laptop:~$ apache2ctl restart
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
httpd not running, trying to start
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs


yet when i run a ps check:

casper@casper-laptop:~$ ps auxwww | grep apache
root 5076 0.0 0.9 15932 4980 Ss 21:14 0:00 /usr/sbin/apache2 -k start
www-data 5079 0.0 0.5 15704 3056 21:14 0:00 /usr/sbin/apache2 -k start
www-data 5081 0.0 0.7 237284 3 21:14 0:00 /usr/sbin/apache2 -k start
www-data 5085 0.0 0.7 237284 21:14 0:00 /usr/sbin/apache2 -k start
casper 6902 0 812 pts/0 S+ 21:33 0:00 grep apahe
casper@casper-laptop:~$

nicedream 02-03-2010 08:39 PM

It looks like you are not running the restart command as root, therefore your previous instances of apache are never shut down.

linuxlover.chaitanya 02-04-2010 12:35 AM

Try running the command as root.

Phoxis 02-04-2010 01:55 AM

I start, stop, or restart apache service as below, after logging in as superuser

service httpd start
service httpd stop
service httpd restart

Or if it is needed after every logging it could be permanently set to run at startup by editing the services, by chkconfig or other graphical tools.

kevmcool 02-04-2010 09:45 AM

make sure the tux service is not running on port 80
service tux status

nicedream 02-04-2010 10:22 AM

Quote:

Originally Posted by kevmcool (Post 3852475)
make sure the tux service is not running on port 80
service tux status

I would say that the odds of the tux webserver running on port 80 are very slim. Not to mention there are at least a half-dozen other http servers that could be running on port 80 (lighttpd, nginx, cherokee...)

I don't know why you singled out tux as the one service he should check for. But, if you want to see what services are bound to which ports, run this command:

Code:

lsof -i


All times are GMT -5. The time now is 08:20 PM.