【发布时间】:2023-04-02 09:39:02
【问题描述】:
所以我正在尝试为朋友的计算机设置一个完整的 LAMP,并且安装似乎一切正常,我只是无法让 apache 找到用户的 ~/public_html 目录。输入 localhost,对于 /var/www 目录或任何正常工作,我都会收到成功消息,但输入 localhost/~user 会给我一个 404。这是我在 apache2.conf 文件中添加的行...
239 # Add user directory public_html
240 UserDir public_html
...这里是 /etc/apach2/mods-enabled/userdir.conf 文件....
1 <IfModule mod_userdir.c>
2 UserDir public_html
3 UserDir disabled root
4
5 <Directory /home/*/public_html>
6 AllowOverride FileInfo AuthConfig Limit Indexes
7 Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoEx ec
8 <Limit GET POST OPTIONS>
9 Order allow,deny
10 Allow from all
11 </Limit>
12 <LimitExcept GET POST OPTIONS>
13 Order deny,allow
14 Deny from all
15 </LimitExcept>
16 </Directory>
17 </IfModule>
18
他正在运行 ubuntu 12.04
~
【问题讨论】:
标签: linux apache lamp mod-userdir