老大为何修改了apache目录就不行了?
lnmp0.7 然后又安装了apacheapache的documentroot 默认是/home/wwwroot
我修改了httpd.conf文件将documentroot 修改成 /data/web ,然后把 /home/wwwroot下面的p.php, phpmyadmin, phpinfo.php 都mv 到 /data/web/下面 (/data是我的另外一个扩展分区 ) serverroot没有动。然后重启apache 发现如下错误:
Object not found!The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404192.168.10.67
Fri Apr 29 11:11:41 2011
Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8b PHP/5.2.17另外,安装包里的readme文件有提到apache 的状态管理是/root/httpd {.....}可是没有/root/httpd 这个文件 我只能whereis apachectl 然后 重启apache.
[ 本帖最后由 puffbaby 于 2011-4-29 11:27 编辑 ] nginx.conf 的
root 也修改成 /data/web
还是不行 Apache状态管理:/etc/init.d/httpd {start|stop|restart|graceful|graceful-stop|configtest|status} 原帖由 licess 于 2011-4-29 12:42 发表 https://bbs.vpser.net/images/common/back.gif
Apache状态管理:/etc/init.d/httpd {start|stop|restart|graceful|graceful-stop|configtest|status}
那个documentroot 更换怎么解决啊?
回复 4# 的帖子
/home/wwwroot/的设置是在/usr/local/apache/conf/extra/httpd-vhosts.conf这里的 原帖由 licess 于 2011-4-29 13:56 发表 https://bbs.vpser.net/images/common/back.gif/home/wwwroot/的设置是在/usr/local/apache/conf/extra/httpd-vhosts.conf这里的
那nginx.conf 不需要修改的吧?
回复 6# 的帖子
都必须改。 原帖由 licess 于 2011-4-29 14:09 发表 https://bbs.vpser.net/images/common/back.gif都必须改。 cat /usr/local/apache/conf/httpd.conf | grep DocumentRoot
#DocumentRoot "/home/wwwroot"
DocumentRoot "/home/wwwroot"
cat /usr/local/nginx/conf/nginx.conf | grep root
#root /home/wwwroot ;
root /data/web ;
cat /usr/local/apache/conf/extra/httpd-vhosts.conf | grep DocumentRoot
#DocumentRoot "/home/wwwroot"
DocumentRoot "/data/web"
/root/lnmp restart
只有PHP-FPM not running
/usr/local/php/sbin/php-fpm没有那个文件或目录
/etc/init.d/httpd stop
/etc/init.d/httpd start
结果index.html 和 phpMyAdmin 正常显示了
但是 探针 和phpinfo 报错
探针的报错:
Warning: Unknown: open_basedir restriction in effect. File(/data/web/p.php) is not within the allowed path(s): (/home/wwwroot:/tmp/:/var/tmp/:/proc/) in Unknown on line 0
Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
Fatal error: Unknown: Failed opening required '/data/web/p.php' (include_path='.:') in Unknown on line 0
phpinfo的报错:
Warning: Unknown: open_basedir restriction in effect. File(/data/web/phpinfo.php) is not within the allowed path(s): (/home/wwwroot:/tmp/:/var/tmp/:/proc/) in Unknown on line 0
Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
Fatal error: Unknown: Failed opening required '/data/web/phpinfo.php' (include_path='.:') in Unknown on line 0 搞定了home/wwwroot:/tmp/:/var/tmp/:/proc 添加 路径 /data/web
回复 8# 的帖子
升级到lnmpa后要用/root/lnmpa 管理
页:
[1]