Arch:Apache更改文档root在/home上-禁止403访问

Arch:Apache更改文档root在/home上-禁止403访问,apache,permissions,archlinux,Apache,Permissions,Archlinux,试着浏览维基和谷歌搜索。没有成功 我在httpd.conf中将documentRoot目录更改为/home/user/web/ <Directory /> AllowOverride none Require all denied </Directory> # # Note that from this point forward you must specifically allow # particular features to be enable

试着浏览维基和谷歌搜索。没有成功

我在httpd.conf中将documentRoot目录更改为/home/user/web/

<Directory />
    AllowOverride none
    Require all denied
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/home/user/web/"
<Directory "/home/user/web/">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

#
# The following lines prevent .htaccess and .htpasswd files from being 
# viewed by Web clients. 
#
<Files ".ht*">
    Require all denied
</Files>

这让我想到了它的权限问题,但不知道如何从这里开始?

请检查以下几点,以便使用apache站点

  • 塞利努克斯
  • 用户和所有权应该与httpd.conf文件中的相同
  • 设置755权限
  • 如果有任何.htaccess文件,请重命名并访问它。如果它正在工作,则需要查看.htaccess文件
  • [Thu Aug 30 16:52:40.918808 2018] [core:error] [pid 1537] (13)Permission denied: [client ::1:37306] AH00035: access to / denied (filesystem path '/home/user/web') because search permissions are missing on a component of the path