启用 Apache 为一个特定目录在一个网域下提供服务。

huangapple go评论48阅读模式
英文:

Enable Apache serve of one specific directory under a web domain

问题

你可以启用对特定目录的访问,即www.mysite.com/mydir

今天我尝试访问,但收到了“403禁止访问”的消息。

禁止访问
您无权访问此服务器上的/mydir/index.html。

我可以将一个.htaccess文件放入mydir目录以启用由Apache服务器提供的index.html文件吗?

英文:

How can i enable access to one specific directory : www.mysite.com/mydir

Today i try to access but i get a 403 forbidden message.

Forbidden
You don't have permission to access /mydir/index.html on this server.

There is an .htaccess file i can drop into the mydir directory to enable the index.html fiel to be served by apache server ?

答案1

得分: 1

在shell中:

$ chmod 755 mydir
$ chmod -R go+r mydir
英文:

In shell:

$ chmod 755 mydir
$ chmod -R go+r mydir

huangapple
  • 本文由 发表于 2020年1月3日 22:34:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/59580385.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定