Apache 2.4不使用新的DocumentRoot,不提供静态内容

时间:2014-01-15 11:27:15

标签: apache2 ubuntu-13.10

这与此问题有关: Apache doesn't use DocumentRoot after upgrading to Ubuntu 13.10 (Uses default page that says "It works!")

我正在使用2.4.6版本。更改DocumentRoot后,当我运行apache2 -S时,我得到默认虚拟主机的值,即DocumentRoot是“/ var / www /.

VirtualHost configuration:
*:80                   is a NameVirtualHost
     default server 127.0.1.1 (/etc/apache2/sites-enabled/000-default.conf:1)
     port 80 namevhost 127.0.1.1 (/etc/apache2/sites-enabled/000-default.conf:1)
     port 80 namevhost 127.0.1.1 (/etc/apache2/sites-enabled/000-default.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex watchdog-callback: using_defaults
Mutex proxy: using_defaults
Mutex default: dir="/var/lock/apache2" mechanism=fcntl 
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used

文档根目录是:

DocumentRoot /home/me/my_git/my_project

我的目录权限是:

<Directory "/home/me/my_git/my_project">
        Options +Indexes +FollowSymLinks +MultiViews
        AllowOverride all
        Require all granted
</Directory>

<Directory />
    Options +FollowSymLinks
    AllowOverride all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI +MultiViews +SymLinksIfOwnerMatch
    Require all granted
</Directory>

我需要知道这种行为的原因以及如何纠正它,我的网页显示为纯文本。如果需要任何其他细节,请告诉我

0 个答案:

没有答案