简体   繁体   English

如何让Apache在OSX / XAMPP环境中遵循符号链接?

[英]How do I make Apache follow symlinks in an OSX / XAMPP environment?

I've been trying to get Apache to follow symlinks. 我一直在努力让Apache遵循符号链接。 I am getting an "Access forbidden!" 我得到了“禁止访问!” message. 信息。

I understand this is likely a permissions issue. 我知道这可能是一个权限问题。

So far I have tried: 到目前为止,我尝试过:

  • Setting the source directory to chmod 777 将源目录设置为chmod 777
  • Adding the xampp/apache user 'nobody' to the groups 'admin' and 'staff' 将xampp / apache用户'nobody'添加到组'admin'和'staff'
  • Both symlink and apache alias directives (both give me the forbidden message) symlink和apache别名指令(都给我禁止的消息)

Source: 资源:

1228833 drwxr-xr-x 27 eric staff 918 Jun 1 09:55 . 1228833 drwxr-xr-x 27 eric staff 918 Jun 1 09:55。
332009 drwxr-xr-x+ 40 eric staff 1360 May 22 10:41 .. 332009 drwxr-xr-x + 40埃里克员工1360 5月22日10:41 ..
1228879 -rw-r--r--@ 1 eric staff 24580 Jun 1 09:55 .DS_Store 1228879 -rw-r - r - @ 1 eric staff 24580 Jun 1 09:55 .DS_Store
30604402 lrwxr-xr-x 1 eric staff 93 Jun 1 09:07 YellowFinTunaPages -> /Users/ericmiller/Dropbox/_iSirona/iSirona Product Development/Prototypes/YellowFinTunaPages/ 30604402 lrwxr-xr-x 1 eric staff 93 Jun 1 09:07 YellowFinTunaPages - > / Users / ericmiller / Dropbox / _iSirona / iSirona产品开发/原型/ YellowFinTunaPages /

Destination: 目的地:

30602721 drwxr-xr-x 4 eric staff 136 Jun 1 09:10 . 30602721 drwxr-xr-x 4 eric staff 136 Jun 1 09:10。
1286885 drwxr-xr-x@ 11 eric staff 374 Jun 1 09:04 .. 1286885 drwxr-xr-x @ 11 eric staff 374 Jun 1 09:04 ..
30606068 -rw-r--r--@ 1 eric staff 6148 Jun 1 09:10 .DS_Store 30606068 -rw-r - r - @ 1 eric staff 6148 Jun 1 09:10 .DS_Store
30602745 drwxrwxrwx 10 eric staff 340 Jun 1 09:05 YellowFinTunaPages 30602745 drwxrwxrwx 10 eric staff 340 Jun 1 09:05 YellowFinTunaPages

Turns out access permissions for a folder depend on the folder above it. 根据文件夹上面的文件夹取决于文件夹的访问权限。 I didn't realize this. 我没有意识到这一点。 I had to chmod 755 the whole preceding directory tree. 我不得不chmod 755整个前面的目录树。 I wish there were a better solution--I don't actually want to allow broad access to that whole tree, just the subfolder. 我希望有一个更好的解决方案 - 我实际上并不想允许广泛访问整个树,只有子文件夹。

Apache won't follow symlinks (403 Forbidden) Apache不会遵循符号链接(403 Forbidden)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM