无法正常启动 apache2

无法正常启动 apache2

这是在 Ubuntu 12.04 机器上新安装的 apache2(家庭用户)

我在 sites-available 目录中创建文件并启用网站后尝试启动服务 apache2,但出现以下错误

user@ubuntu:/etc/apache2/sites-enabled$ service apache2 reload
 * Reloading web server config apache2                                                                                                                /usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)
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
Action 'graceful' failed.
The Apache error log may have more information.
                                                                                                                                               [fail]

现在我在 apache 日志中找不到任何东西,但在这里发布了 error.log

[Tue Jun 11 22:14:09 2013] [notice] Apache/2.2.22 (Ubuntu) configured -- resuming normal operations
[Tue Jun 11 22:14:14 2013] [notice] caught SIGTERM, shutting down
[Tue Jun 11 22:14:15 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3 with Suhosin-Patch configured -- resuming normal operations
[Tue Jun 11 22:16:41 2013] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Wed Jun 12 16:02:54 2013] [notice] caught SIGTERM, shutting down
[Wed Jun 12 17:03:45 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3 with Suhosin-Patch configured -- resuming normal operations
[Wed Jun 12 23:04:19 2013] [notice] Graceful restart requested, doing restart
[Wed Jun 12 23:04:23 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3 with Suhosin-Patch configured -- resuming normal operations
[Thu Jun 13 00:09:50 2013] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Thu Jun 13 00:43:26 2013] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico

这是 access.log

127.0.0.1 - - [11/Jun/2013:22:16:40 +0530] "GET / HTTP/1.1" 200 483 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"
127.0.0.1 - - [11/Jun/2013:22:16:41 +0530] "GET /favicon.ico HTTP/1.1" 404 498 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"
127.0.0.1 - - [12/Jun/2013:23:04:19 +0530] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
127.0.0.1 - - [12/Jun/2013:23:04:19 +0530] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
127.0.0.1 - - [12/Jun/2013:23:04:19 +0530] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
127.0.0.1 - - [12/Jun/2013:23:04:19 +0530] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
127.0.0.1 - - [12/Jun/2013:23:04:19 +0530] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
127.0.0.1 - - [13/Jun/2013:00:09:49 +0530] "GET / HTTP/1.1" 200 483 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"
127.0.0.1 - - [13/Jun/2013:00:09:50 +0530] "GET /favicon.ico HTTP/1.1" 404 498 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"
127.0.0.1 - - [13/Jun/2013:00:43:25 +0530] "GET /tshirtshop HTTP/1.1" 301 555 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"
127.0.0.1 - - [13/Jun/2013:00:43:25 +0530] "GET /tshirtshop/ HTTP/1.1" 200 646 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"
127.0.0.1 - - [13/Jun/2013:00:43:26 +0530] "GET /icons/blank.gif HTTP/1.1" 200 437 "http://localhost/tshirtshop/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"
127.0.0.1 - - [13/Jun/2013:00:43:26 +0530] "GET /icons/back.gif HTTP/1.1" 200 506 "http://localhost/tshirtshop/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"
127.0.0.1 - - [13/Jun/2013:00:43:26 +0530] "GET /favicon.ico HTTP/1.1" 404 498 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"

apache2 服务出了什么问题,无法启动......

答案1

您需要超级用户权限才能与service实用程序交互。使用sudo可解决问题:

sudo service apache2 reload

相关内容