简体   繁体   中英

Apache files shown as index but not accessible

I am having some trouble accessing files on Apache 2.4 running on Ubuntu.

The files that are inaccessible are being shown in the alias folder /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). 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. 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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