我最近設置了一個Virtualbox,這樣我就可以在本地執行我的webdev,並且與我的作品緊密匹配。在這個過程中,我開始更新我的應用程序,使其在環境之間更具移動性(並將PHP更新到7.1)。不幸的是,似乎突然之間,阿帕奇似乎並不想爲javascript/
文件夾中的任何文件提供服務,我無法說出原因。在我通過NPM在全球範圍內安裝Typescript之後,這似乎是正確的,但我不明白這可能是相關的。我不知道如何調試Apache。Apache不從一個特定文件夾提供文件
在服務器上唯一的虛擬主機配置是,涉及到這個網站的一個:
<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>
該項目有一個htaccess,但似乎並未有任何有關:
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
在javascript/
中找到任何文件,如http://gamersplane.local/javascript/gamersplane.js
會返回「未找到」錯誤,即使該文件確實存在。任何建議如何調試這將不勝感激。