wampserver 404 错误 在此服务器上找不到请求的 URL



我安装了wamp server,它工作正常,因为图标颜色为绿色,甚至本地主机也可以正常工作,但是当我在www folder中添加任何PHP文件并尝试访问该文件时,就会出现问题,它给了我以下消息:

404 error The requested URL was not found on this server.

任何帮助将不胜感激。

如何在本地主机上的 wamp 服务器上运行 PHP 项目或文件?

  1. 运行 wamp 服务器
  2. 在目录中创建 PHP 项目或文件C://wamp/www/
  3. 运行您的项目或文件意味着在浏览器中打开 URL,例如:http://localhost/file_name.php or folder name

如果文件夹具有index.php文件,它将通过在 URL 中调用文件夹名称来运行。

运行项目或文件;意味着在浏览器中打开 URL

示例

http://localhost/file_name.php 或文件夹名称

您应该通过/wamp64/bin/apache/apache2.4.41/conf/extra/httpd-vhosts.conf检查httpd-vhosts.conf文件。 福尔温斯; 这里的端口号例如 83,因为这是我的选择:

# Virtual Hosts
#
<VirtualHost *:83>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

#
<VirtualHost *:83>
ServerName myProject
DocumentRoot "d:/wamp64/www/spip-projet-v"
<Directory  "d:/wamp64/www/spip-projet-v/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

最新更新