本文介绍了var/www/html目录的权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
然后我安装了ubuntu服务器14.04(apache,php和mysql).我将我的网站上传到/var/www/html并对其进行nuzip,并将其链接到数据库.当我在浏览器中请求我的IP时,我得到了主页,但是当单击站点中的任何URL时,它返回404 not found错误(不是从我的网站),而是从服务器返回.我搜索了但问题没有解决这就是我尝试过的
I installed ubuntu server 14.04 then (apache,php and mysql).I uploaded my website to /var/www/html and nuzip it and linked it to database.When I request my ip in the browser i get the home page, but when click on any url in the site it returns 404 not found error - not from my website- but from the server.I searched but problem not solvedthis is what i tryed
chmod -R g+w /var/www/html
chown -R $user:$user /var/www/html/
chown -R www-data:www-data /var/www/html/
但并非如此.有什么主意吗?
but non of this works.any idea ?
推荐答案
我通过运行此命令
a2enmod rewrite
然后重新启动apache服务器.
then restart apache server.
感谢每个人都试图帮助我:)
Thanks to everybody tryed to help me :)
这篇关于var/www/html目录的权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!