[英]Apache files shown as index but not accessible
I am having some trouble accessing files on Apache 2.4 running on Ubuntu. 我在访问在Ubuntu上运行的Apache 2.4上的文件时遇到一些麻烦。
The files that are inaccessible are being shown in the alias folder /static/. 别名文件夹/ static /中显示了无法访问的文件。
When trying to access any of the items displayed I get the following message. 尝试访问显示的任何项目时,都会收到以下消息。
Not Found
The requested URL /static/abe.css was not found on this server.
The virtual host file for this looks like... 虚拟主机文件看起来像...
<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>
Check (fix) permission on files, in order to be readable/accessible to other (like is Apache user set in your configuration). 检查(修复)文件权限,以便其他人可以读取/访问(例如,在配置中设置了Apache用户)。 Usually set read by others and execute/search by others.
通常设置为他人读取并由他人执行/搜索。 For example chmod 755 for directory, and 644 [ read by owner, write by owner , read by group, read by others] for files.
例如,目录使用chmod 755,文件使用644 [所有者读取,所有者写入,组读取,其他读取]。 You can also change you setting for folder to:
您还可以将文件夹设置更改为:
<Directory /home/explorer/HTMLCoinExplorer/HTMLCoin-Abe/htdocs/>
Options All
AllowOverride All
Require all granted
</Directory>
Just to test 只是测试
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.