简体   繁体   中英

Apache not serving files from one particular folder

I recently setup a Virtualbox so I could do my webdev locally with an environment that closely matches my production. In the process, I started updating my app to be more mobile between environments (along with updating PHP to 7.1). Unfortunately, seemingly out of the blue, suddenly Apache doesn't seem to want to serve any of the files in the javascript/ folder, and I can't tell why. This seemingly right after I installed Typescript globally through NPM, but I don't see how that could be related. I have no idea how to debug Apache.

The only vhost config on the server is the one that relates to this site:

<VirtualHost *:80>
        ServerName api.gamersplane.local
        DocumentRoot /var/www/Gamers_Plane/api
        <Directory /var/www/Gamers_Plane/api/>
                Options Indexes FollowSymLinks
                AllowOverride All
                Require all granted
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/gamersplane/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel notice

        CustomLog ${APACHE_LOG_DIR}/gamersplane/access.log combined
</VirtualHost>

<VirtualHost *:80>
        ServerName gamersplane.local
        ServerAlias *.gamersplane.local
        DocumentRoot /var/www/Gamers_Plane
        <Directory /var/www/Gamers_Plane/>
                Options Indexes FollowSymLinks
                AllowOverride All
                Require all granted
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/gamersplane/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel notice

        CustomLog ${APACHE_LOG_DIR}/gamersplane/access.log combined
</VirtualHost>

The project has an htaccess but it doesn't seem to have anything related:

ErrorDocument 401 errors/401
ErrorDocument 403 errors/403
ErrorDocument 404 errors/404

Options -Indexes +FollowSymLinks
RewriteEngine On

RewriteBase /

#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_URI} !^(.*)/$
#RewriteRule ^(.*)$ /$1/ [L,R=301]

RewriteCond %{REQUEST_URI} !^/blog
RewriteCond %{REQUEST_URI} !^/phpthumb
RewriteCond %{REQUEST_URI} !^/backup
RewriteCond %{REQUEST_URI} !^/test\d?\.php$
RewriteCond %{REQUEST_URI} !^/phpinfo\.php$
RewriteCond %{REQUEST_URI} !^/test/
RewriteCond %{REQUEST_URI} !^/dbBackup\.php$
RewriteCond %{REQUEST_URI} !^/oneRunScripts/
RewriteCond %{REQUEST_URI} !^/angular/
RewriteRule !\.(css|jpg|js|gif|png|ico|eot|woff|woff2|ttff|svg|psd|mp3)$ dispatch.php

Hitting any file in javascript/ such as http://gamersplane.local/javascript/gamersplane.js returns a "Not Found" error, even though the file definitely exists. Any advice in how to debug this would be appreciated.

Changing what I was googling, I found that the Apache javascript-common package was installed somehow or just enabled when I installed typescript. I have no idea if the package is necessary, so I'm trying to find that out before I disable the package (trying to search for what the package does or is used for is leading to nothing).

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