在localhost(Ubuntu)上打开HTML文件 [英] Opening HTML files on localhost (Ubuntu)
问题描述
我使用Ubuntu 14.04并安装了Apache 2.4.7很久以前了,所以我真的不记得我第一次安装它时所做的所有配置更改.这是我的问题.当我键入http://localhost
时,它将在Web浏览器上显示我的本地主机.
I am using Ubuntu 14.04 and installed Apache 2.4.7 quite a while back, so I do not really remember all the configuration changes I made when I installed it first. Here is my problem. When I type http://localhost
, it shows up my localhost on the web browser.
我可以轻松打开PHP文件.
I can open PHP files without any trouble.
但是当我尝试在localhost上打开HTML文件时,我得到了;
But when I try to open HTML files on the localhost, I get this;
如何解决在服务器上无法访问.html的权限"问题?
How do I fix the 'no permission to access .html on server' problem?
推荐答案
完成!
我打开了终端,然后输入:
I opened up terminal and enter:
sudo chmod -R 755 /var/www
,它奏效了.感谢所有提供帮助的人!
and it worked. Thanks to all those who helped!
这篇关于在localhost(Ubuntu)上打开HTML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!