【问题标题】:Error 403 - XAMPP with angular project错误 403 - 带有角度项目的 XAMPP
【发布时间】:2016-04-21 05:25:08
【问题描述】:

我曾经使用 grunt serve 运行我的 Angular 项目

现在我需要它在我的 XAMPP 上运行,所以我将它安装到我的 C:\xampp\htdocs\

但即使在更改我的httpd-xampp.conf 之后,我也会收到 403 拒绝访问

要求在SO 上也写的所有授予

我也重新启动了我的 Apache。

我还缺少什么?

谢谢

【问题讨论】:

  • 你能发布你的httpd-xampp.conf吗?

标签: angularjs apache xampp http-status-code-403


【解决方案1】:

请按以下步骤:

  1. 您是否拥有 Angular 项目文件夹的读取权限。
  2. 确保您已提供 index.html 的文档路径 例如:
<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

因为这个 index.html 应该在 html 文件夹中。

  1. Angular 应用程序所需的资产文件失败的可能性很小。确保所有断言文件都已加载。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-10-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-29
    • 1970-01-01
    • 1970-01-01
    • 2018-06-20
    相关资源
    最近更新 更多