-1

我有一个问题:我挂载文件夹/var/www/html/testram

mount -t tmpfs -o size=5m,mode=0755 tmpfs /var/www/html/testram

并将文件 index.php 与一些文本放在一起。当我从网络浏览器打开网站时,我看不到任何文字。我有的:

drwxrwxrwx.  2 root    root     60 May 25 17:42 testram  
-rwxrwxrwx.  1 root    root 132723 May 25 17:18 index.php

在日志中我有错误:

PHP警告:

Unknown: failed to open stream: Permission denied in Unknown on line 0

PHP Fatal error:  Unknown: Failed opening required '/var/www/html/testram/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0

我做了一个实验并创建了一个文件夹

drwxr-xr-x. 2 root root     22 May 25 17:25 testfolder

并创建文件

-rw-r--r--. 1 root root 132723 May 25 17:12 index.php 

用相同的文字。

当我从网络浏览器打开这个 index.php 时,我看到了文本。

为什么我在 tmpfs 中没有看到来自 index.php 的任何文本。

谢谢

chown apache.apache -R testram有什么作用

4

1 回答 1

0

您应该在httpd.confor中启用符号链接.htaccess

Options +FollowSymlinks
于 2015-05-25T20:58:27.857 回答