用户名:
密 码: 记住
您当前的位置:首页 > 站长百科 > 服务器技术

apache访问根目录 配置作用域的相关资料

时间:2015-01-18  来源:互联网  作者:佚名

我的网站有个功能 比如 www.abc.com 对应的目录是 aaa 还有一个网站目录为 www.123.com 对bbb

但是需要在www.abc.com 上次文件的同事 往 www.123.com 里面也给生成一个同样的 文件。 但是原配设置是有问题的,传布上去。

查找思路:

1、文件权限问题
2、访问所属者

两个都查完了 发现都没问题, 郁闷了,最后想到 网站单独的配置文件的问题,于是打开 www.abc.com 对应的apache 配置文件:

. 代码如下:
<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>

发现多了一行,查看了一下 php_admin_value open_basedir 这个说白了是设置作用域。这里你设置一下便可解决问题。

设置方法:

可以在 :/tmp 后面在罗列允许访问的目录 :/** 同样也可以更改前面的目录 往上一级走。

来顶一下
返回首页
返回首页
推荐资讯
【图文教程】dede织梦网站后台如何发表文章? 【图文教程】dede织梦网站后台如何对于新手站长可能不了解,dede织梦后台是如何发文章的。下面
2014站长圈十大事件:PR已死 移动算法兴起 2014站长圈十大事件:PR已死 移动算2014年即将过去,虽然站长圈相比过去几年稍显沉寂,但&ldquo
相关文章
    无相关信息
栏目更新
栏目热门