XAMPP +虚拟主机 +群组共享文件夹
我有一个为所有用户安装的文件夹,这些用户位于“common”组中用于共享文件
/home/.common/ 通过 fstab 挂载到 /home/common
bindfs#/home/.common /home/common 保险丝组=common,perms=g=rwx
我也想共享站点文件夹。我将站点放在目录 /home/common/Sites/
并为这些目录创建虚拟主机。但我输入时出错。
禁止访问!
您无权访问 请求的目录。有 要么没有索引文档,要么 目录是读保护的。
如果您认为这是服务器错误, 请联系站长。
错误 403
在 httpd.conf
# Virtual hosts
Include etc/extra/httpd-vhosts.conf
在 httpd-vhosts.conf
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /home/common/Sites/mysite
ServerName mysite
ErrorLog /home/common/Sites/mysite/mysite.local-error_log
CustomLog /home/common/Sites/mysite/mysite.local-access_log common
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /home/common/Sites/mysecondsite
ServerName mysecondsite
ErrorLog /home/common/Sites/mysecondsite/mysecondsite.local-error_log
CustomLog /home/common/Sites/mysecondsite/mysecondsite.local-access_log common
</VirtualHost>
在 .local-error_log
[error] [client 127.0.0.1] (13)Access denied: access to / denied
当我打开 vhosts - localhost 返回错误也。如果关闭 LH 效果很好。
如何制作这个结构?
I have folder which mount for all users which in group 'common' for sharing files
/home/.common/ mounted to /home/common by fstab
bindfs#/home/.common /home/common fuse group=common,perms=g=rwx
I want to share sites folders too. I put sites to dir /home/common/Sites/
and made virtual host to those directories. But i'm having error on enter.
Access forbidden!
You don't have permission to access
the requested directory. There is
either no index document or the
directory is read-protected.If you think this is a server error,
please contact the webmaster.Error 403
in httpd.conf
# Virtual hosts
Include etc/extra/httpd-vhosts.conf
in httpd-vhosts.conf
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /home/common/Sites/mysite
ServerName mysite
ErrorLog /home/common/Sites/mysite/mysite.local-error_log
CustomLog /home/common/Sites/mysite/mysite.local-access_log common
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /home/common/Sites/mysecondsite
ServerName mysecondsite
ErrorLog /home/common/Sites/mysecondsite/mysecondsite.local-error_log
CustomLog /home/common/Sites/mysecondsite/mysecondsite.local-access_log common
</VirtualHost>
in .local-error_log
[error] [client 127.0.0.1] (13)Access denied: access to / denied
When i turn on vhosts - localhost returns error too. If turn off LH works good.
How to make this structure?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题出在权限上。我需要更改 opt/lampp/etc/httpd.conf 中的 apache 用户和组
The problen was in permissions. I was need to change apache user and group in opt/lampp/etc/httpd.conf