0

I'm trying to import jquery library in my Laravel project, in my firebug i'm seeing the message:

"NetworkError: 403 Forbidden - http://test.local/js/jquery_min.js"

Why is LARAVEL blocking my script, to be loaded?

Vesko Vujovic
  • 131
  • 1
  • 1
  • 9
  • Where is laravel run from? This looks suspiciously like a browser preventing the loading of local resources. – EWit Dec 29 '14 at 11:30
  • Yes as you can see he's preventing the script to be loaded properly. The server is local server, Apache, and i made virtual host for this project. – Vesko Vujovic Dec 29 '14 at 11:37
  • Make sure the directory is readable by apache. Since it's a static file it has nothing to do with laravel. – Ram Dec 29 '14 at 12:04
  • I saw article for problem like mine http://stackoverflow.com/questions/6959189/apache-virtualhost-403-forbidden , but still i cant fix the problem. – Vesko Vujovic Dec 29 '14 at 13:07
  • Check the files/directories _permissions_. – Ram Dec 29 '14 at 13:34
  • Thank you guys for assisting me. I found the problem. New Apache 2.4 maybe earlier versions, have added new security features.... If you had the same problem as i you must the next things. 1. You must go to your virtual host configuration with command " sudo nano /etc/apache2/sites-available/your-name-of-the-site.conf". 2. Put Requred all granted AllowOverride All Allow from All Require all granted Then type sudo chmod -R 777 /etc/apache3 – Vesko Vujovic Dec 29 '14 at 13:40
  • The same command for your site directory and restart apache and it will work. – Vesko Vujovic Dec 29 '14 at 13:45
  • Don't set the permissions to 777. Set it to 755. – Ram Dec 29 '14 at 16:21

1 Answers1

0

I think there might be error in file to access or file name may be wrong

check whether the file name is jquery_min.js or jquery.min.js, if file name was right then try access with cdn : https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js in script tag

Notify if you found any solutions Thank you