1

I am use apache with virtual host as my server. I also use yeoman to generate angular app template. For some reason, when I launch my site, I can see the index page but the console gave me 403 forbidden errors all on bower components like bootstrap, angular.js...etc. I am not sure what I did wrong. Can someone help? Thanks!

my V-host file

<VirtualHost *:80>
    ServerAdmin myname@gmail.com
    DocumentRoot "/Users/John/testproject/app"
    ServerName testproject.localhost
    ErrorLog "/private/var/log/apache2/testproject-error_log"
    CustomLog "/private/var/log/apache2/testproject-access_log" common
    <Directory "/Users/John/testproject/app">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
        Require all granted
    </Directory>
</VirtualHost>

My project structure.

testproject
   app 
       bower_components <-symlink
   bower_components
       angular     <----403 error
       bootstrap   <----403 error
       ...etc
   Gruntfile.js
   Bower.json

My url on the browser

testproject.localhost

Thanks for the help!

Deepak Kushvah
  • 278
  • 2
  • 12
BonJon
  • 779
  • 1
  • 7
  • 21

1 Answers1

0

You need to move your project under /var/www/ directory as /User directory is not accessible to apache2 and after moving folder check permission and set permission to 777

sudo chmod -r 755 folder_path

if still don't work set it to

sudo chmod -r 777 folder path

and restart apache2. Also don't forget to change path in apache2 config file.

sachin
  • 165
  • 1
  • 15