服务器配置拒绝Apache客户端:/ var / www / html / nc /

时间:2018-02-08 21:59:52

标签: php linux apache ubuntu

/etc/apache2/apache2.conf中

<Directory "/var/www/html/nc>
  Allow from all
  Order Deny,Allow
</Directory>

/etc/apache2/sites-available/000-default.conf

<VirtualHost *:80>
        DocumentRoot /var/www/html/nc
<VirtualHost>

sudo nano /etc/init.d/apache2 reload

[....] Reloading apache2 configuration (via systemctl): apache2.serviceapache2.service is not active, cannot reload.
 failed!

sudo nano /etc/init.d/apache2 force-reload

[ ok ] Reloading apache2 configuration (via systemctl): apache2.service.

sudo nano /etc/init.d/apache2 start

[....] Starting apache2 (via systemctl): apache2.serviceJob for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
 failed!

sudo nano / etc / hosts

127.0.0.1       local.nc

ls -l / var / www / html

drwxrwxr-x 6 root root 4096 Feb  8 21:30 nc

ls -l / var / www / html / nc /

total 16
drwxrwxr-x 2 root root 4096 Feb  8 21:30 classes
drwxrwxr-x 2 root root 4096 Feb  8 21:30 includes
-rwxrwxr-x 1 root root 3103 Feb  8 21:30 index.php
-rwxrwxr-x 1 root root  137 Feb  8 21:30 post_handler.php

cat /var/log/apache2/error.log

[Thu Feb 08 22:04:09.684707 2018] [authz_core:error] [pid 14190] [client 127.0.0.1:41740] AH01630: client denied by server configuration: /var/www/html/nc/
[Thu Feb 08 22:04:09.903717 2018] [authz_core:error] [pid 14190] [client 127.0.0.1:41740] AH01630: client denied by server configuration: /var/www/html/nc/
[Thu Feb 08 22:04:52.846573 2018] [mpm_prefork:notice] [pid 12580] AH00169: caught SIGTERM, shutting down

Firefox说因为我无法开始......我做错了。

Unable to connect

0 个答案:

没有答案