1
在运行XAMPP的Windows机器上,我的web根目录中有一个名为'static'的文件夹。即使文件夹在那里,它和其中的所有内容都会返回404错误。Directory'static'给404错误
如果我更改文件夹的名称,例如'静态',一切都很好。我有其他运行Apache的服务器(Ubuntu),我没有这个问题。
该网站是我们的一台Linux服务器上的其中一个网站的副本。我可以做什么或更改以允许该目录按指定方式工作?
编辑 vhosts.conf
<VirtualHost *:8080>
ServerAdmin [email protected]
DocumentRoot "C:/xampp/htdocs/home/app/gateway"
ServerName localhost
ServerAlias 127.0.0.*
ErrorLog "logs/error.log"
CustomLog "logs/access.log" common
</VirtualHost>
<Directory C:/xampp/htdocs/home/app/gateway/>
# allow .htaccess overrides to work
AllowOverride All
DirectoryIndex login.html index.html index.php
</Directory>
# this matches a link to any project directory to the physical webui directory
AliasMatch ^/projects/([-\w]*)/(.*)$ /home/src/gateway/webui/$2
<Directory /home/src/gateway/webui>
DirectoryIndex home.html
Options All
AllowOverride All
Require all granted
</Directory>
该文件夹的完整路径是什么?静态 –
你的apache配置中没有对/ static进行特殊处理? – covener
你能向我们展示你的虚拟主机吗? – Sculper