apache accesses information about the root directory configuration scope

  • 2020-05-06 12:09:08
  • OfStack

My website has a function   such as   www.abc.com   corresponding directory is aaa     and a website directory is www.123.com   versus bbb

However, we need to generate the same file in www.abc.com from the colleague of last file www.abc.com to www.123.com. But there is something wrong with the original Settings.

Find ideas:

1. File permission problem
2. Visit the host

Finally, I thought of the problem of the separate configuration file of   website, so I opened the apache configuration file corresponding to www.abc.com :


<VirtualHost *:80>
DocumentRoot /www/web/system/aaa/public_html
ServerName www.abc.com
DirectoryIndex index.php
ErrorDocument 400 /errpage/400.html
ErrorDocument 403 /errpage/403.html
ErrorDocument 404 /errpage/404.html
ErrorDocument 405 /errpage/405.html
php_admin_value open_basedir /www/web/system/aaa:/tmp
<IfModule mod_deflate.c>
DeflateCompressionLevel 7
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-httpd-php
AddOutputFilter DEFLATE css js html htm gif jpg png bmp php
</IfModule>
</VirtualHost>
<Directory /www/web/system/aaa>
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory> 

I found that I had one more line, so I looked at php_admin_value open_basedir   and this is basically setting the scope. Here you can set it up to solve the problem.    

Setting method:

After: / tmp, you can list the directories you are allowed to access: / * *    . You can also change the previous directory to move up one level.


Related articles: