[英]Apache files shown as index but not accessible
我在訪問在Ubuntu上運行的Apache 2.4上的文件時遇到一些麻煩。
別名文件夾/ static /中顯示了無法訪問的文件。
嘗試訪問顯示的任何項目時,都會收到以下消息。
Not Found
The requested URL /static/abe.css was not found on this server.
虛擬主機文件看起來像...
<VirtualHost *:80>
ServerName explorer.htmlcoin.com
Alias /static/ /home/explorer/HTMLCoinExplorer/HTMLCoin-Abe/htdocs
Alias /robots.txt /home/explorer/HTMLCoinExplorer/HTMLCoin-Abe/htdocs/robots.txt
Alias /favicon.ico /home/explorer/HTMLCoinExplorer/HTMLCoin-Abe/htdocs/favicon.ico
Alias / /usr/lib/cgi-bin/abe.fcgi/
# FcgidIOTimeout 40
ServerAdmin webmaster@localhost
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory /home/explorer/HTMLCoinExplorer/HTMLCoin-Abe/htdocs>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory /home/explorer/cgi-bin>
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all granted
</Directory>
# Uncomment to log Abe requests.
ErrorLog /var/log/abe_error.log
CustomLog /var/log/abe_access.log combined
</VirtualHost>
檢查(修復)文件權限,以便其他人可以讀取/訪問(例如,在配置中設置了Apache用戶)。 通常設置為他人讀取並由他人執行/搜索。 例如,目錄使用chmod 755,文件使用644 [所有者讀取,所有者寫入,組讀取,其他讀取]。 您還可以將文件夾設置更改為:
<Directory /home/explorer/HTMLCoinExplorer/HTMLCoin-Abe/htdocs/>
Options All
AllowOverride All
Require all granted
</Directory>
只是測試
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.