繁体   English   中英

Apache文件显示为索引但不可访问

[英]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.

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