【问题标题】:404 Not Found - Can't get apache webserver to see UserDir404 Not Found - 无法让 apache 网络服务器查看 UserDir
【发布时间】: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


    【解决方案1】:

    第一个猜测:也许 mod_userdir 实际上没有加载。那么你的配置不会有任何影响。

    寻找类似的行

    LoadModule userdir_module libexec/apache2/mod_userdir.so
    

    在你的配置中

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-12-09
      • 1970-01-01
      • 2019-06-09
      • 1970-01-01
      • 1970-01-01
      • 2018-09-08
      • 2016-06-30
      • 1970-01-01
      相关资源
      最近更新 更多