简体   繁体   English

403 Angular JS教程的禁止问题

[英]403 Forbidden issues with Angular JS tutorial

I am trying to learn Angular JS using this online tutorial . 我正在尝试使用此在线教程来学习Angular JS。 I decided to download his test project to look at the file structure and how everything is working. 我决定下载他的测试项目,以查看文件结构以及一切工作方式。 The files are available from this GitHub repo : 这些文件可从以下GitHub存储库获取

I followed the instructions in the readme file but when I load the index page the Wine List fails to load due to a 403 Forbidden error . 我按照自述文件中的说明进行操作,但是当我加载索引页面时,由于403 Forbidden error而导致无法加载Wine List。 I have a hunch that this might be due to either file permission or mod_rewrite issues but I don't know how to solve it. 我有种预感,这可能是由于文件许可权或mod_rewrite问题引起的,但我不知道如何解决。

I have looked through the http.conf file at /etc/apache2/ and mod_rewrite appears to be enabled and I've also put a phpinfo(); 我已经浏览了/etc/apache2/http.conf文件,并且mod_rewrite似乎已启用,并且我还放了一个phpinfo(); http.conf file in my root directory and looked for mod_rewrite in the enabled modules and it appears to be there. 我的根目录中的文件,并在启用的模块中寻找mod_rewrite ,它似乎在那里。 Any ideas? 有任何想法吗?

In your Apache config file (httpd.conf or extras/httpd-vhosts.conf) add: 在您的Apache配置文件(httpd.conf或extras / httpd-vhosts.conf)中添加:

<Directory "C:/path/to/files">
   Require all granted
</Directory>

Use your actual path, this will grant Apache access to the directory. 使用您的实际路径,这将授予Apache访问该目录的权限。

After reading through a few of the related questions I found a solution: 阅读一些相关问题后,我找到了解决方案:

Adding the following to my vhost file did the trick: 将以下内容添加到我的vhost文件即可达到目的:

Options +FollowSymLinks

I hope this helps someone else! 我希望这可以帮助其他人!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM