简体   繁体   中英

How can apache access files under /root directory

When I access file under /root from apache it returns "Access forbidden!", How can I configure apache to access files under /root?

enter image description here

I recommend use the next plugin in Apache for specify a user in specific.

Note: This must be specified in the virtualhost.

apt install libapache2-mpm-itk
a2enmod mpm_itk

Example:

<VirtualHost *:80>
    ServerName  {domain}

    <Directory /root>
        <ifmodule mpm_itk_module>
            AssignUserID    {user} {group}
        </ifmodule>
    </Directory>
</VirtualHost>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM