0
我在Centos機器上有一個虛擬主機(Linux i-8941-35408-VM 2.6.18-308.11.1.el5xen#1 SMP Tue Jul 10 09:29:47 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux)。我的Vhost配置文件如下如何解決這個403禁止的錯誤
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName subdomain.domain.biz
ServerAlias sudomain.domain.biz
DocumentRoot /home/myfolder/public_html/subdomain.domain.biz/public
LogLevel warn
ErrorLog /home/myfolder/public_html/subdomain.domain.biz/log/error.log
CustomLog /home/myfolder/public_html/subdomain.domain.biz/log/access.log combined
<Directory /home/myfolder/public_html/subdomain.domain.biz/public>
Options FollowSymLinks -Indexes -Includes
#What about Multiviews for Options above
AllowOverride All
Order allow,deny
Allow from all
</Directory>
我沒有.htaccess文件。
「公共」文件夾的目錄列表如下:
-rw-r--r-- 1 root root 2763 Jan 22 07:11 FailedTRAN.php
-rw-r--r-- 1 root root 11890 Jan 22 18:54 GetHandleRESponse.old
-rwxrwxrwx 1 root root 12024 Jan 23 17:14 GetHandleRESponse.php
drwxr-xr-x 2 root root 4096 Jun 9 2012 images
-rw-r--r-- 1 root root 2562 Jan 22 07:11 Index.html
-rw-r--r-- 1 root root 9556 Jan 23 18:21 SendPerformREQuest.php
-rw-r--r-- 1 root root 3396 Jan 22 07:11 StatusTRAN.php
我能夠從我的瀏覽器訪問的Index.html,但是任何試圖訪問一個403 Forbidden錯誤GetHandleRESponse.php結果。因此,當我向另一臺服務器發送請求時,其他服務器必須通過訪問GetHandleRESponse.php頁面發佈其響應。這失敗了。我無法弄清楚爲什麼會出現這種情況。任何幫助,將不勝感激。
謝謝。然而,這個問題與這些文件的安全上下文有關。在基於Linux的風格中,像Centos文件具有安全上下文。我做了一個ls -lZ,我得到了以下清單
drwxrwxrwx root root root:object_r:user_home_t SendPerformREQuest.phpso我做了一個chcon -vR --type = httpd_sys_content_t SendPerformREQuest.php解決了這個問題。 –