Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Sinres's avatar

Failed to load resource: the server responded with a status of 403 (Forbidden) in my public folder

Hello Guys,

I have some problem with my public folder and remote libraries do not work. This is error in my brower console:

Failed to load resource: the server responded with a status of 403 (Forbidden)
fullcalendar.io/js/fullcalendar-3.1.0/lib/jquery.min.js:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
fullcalendar.io/js/fullcalendar-3.1.0/fullcalendar.min.js:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
fullcalendar.io/js/fullcalendar-3.1.0/lib/jquery-ui.min.js:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
fullcalendar.io/js/fullcalendar-3.1.0/locale-all.js:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
fullcalendar.min.css:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
fullcalendar.io/js/fullcalendar-3.1.0/fullcalendar.min.js:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
fullcalendar.io/js/fullcalendar-3.1.0/locale-all.js:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
fullcalendar.min.css:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
gijgo.min.js:1 Uncaught ReferenceError: jQuery is not defined
    at gijgo.min.js:1
datepicker-pl.js:5 Uncaught TypeError: Cannot read property 'messages' of undefined
    at datepicker-pl.js:5
(index):133 Uncaught ReferenceError: jQuery is not defined
    at (index):133
(index):1 This page includes a password or credit card input in a non-secure context. A warning has been added to the URL bar. For more information, see https://goo.gl/zmWq3m.
fullcalendar.min.css:1 Failed to load resource: the server responded with a status of 403 (Forbidden)

I did resarch but I have not found solution for me. In my /public and /storage and /resource i have chmod 777 but it did not give a positive result

I forgot this is my .htaccess:

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

And my .env:

APP_NAME="App name"
APP_ENV=local
APP_KEY=base64:AzP//VhpTaIhs+FewCfTlPdgIn2xVl6I7nvenpFVki4=
APP_DEBUG=false
APP_URL=http://mypage.com

I was looking for a solution to the problem, but nothing solved my problem, that's why I am asking you help.

0 likes
6 replies
Sinnbeck's avatar

What happens if you open one of the urls in a new tab directly? eg. YOURURL/fullcalendar.io/js/fullcalendar-3.1.0/lib/jquery.min.js What type of operating system are you running? Windows or linux?

Sinres's avatar

@RESIN - When open one of the urls I see liblary content. Operating system is Linux but public directory has chmod 755 and when I change to chmod 777 I have this same result

Sinres's avatar

In resource/layouts/app.blade.php in head section:

<!-- Fonts -->
    <link rel="dns-prefetch" href="https://fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet" type="text/css">

    <!-- calendar -->
    <script src='https://fullcalendar.io/js/fullcalendar-3.1.0/lib/moment.min.js'></script>
    <script src='https://fullcalendar.io/js/fullcalendar-3.1.0/lib/jquery.min.js'></script>
    <script src='https://fullcalendar.io/js/fullcalendar-3.1.0/lib/jquery-ui.min.js'></script>
    <script src='https://fullcalendar.io/js/fullcalendar-3.1.0/fullcalendar.min.js'></script>
    <script src='https://fullcalendar.io/js/fullcalendar-3.1.0/locale-all.js'></script>
    
    <!-- Styles -->
    <link rel='stylesheet' href='https://fullcalendar.io/js/fullcalendar-3.1.0/fullcalendar.min.css' />
    <link href="{{ asset('css/app.css') }}" rel="stylesheet">

    <!-- Scripts -->
    <script src="{{ asset('js/app.js') }}" defer></script>

    <!-- Fa Fa Icons -->
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
    
    <!-- Data Picker -->
    <script src="https://unpkg.com/[email protected]/js/gijgo.min.js" type="text/javascript"></script>
    <link href="https://unpkg.com/[email protected]/css/gijgo.min.css" rel="stylesheet" type="text/css" />
    <script src="{{ asset('js/datepicker-pl.js') }}"></script>

But js/app.js and css/app.css works correctly and are loaded

tgrassmee's avatar

installed on local machine? where is .htaccess stored?

Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

You are loading the files directly from their site which they do not allow. Instead download the files and pub them in your local public folder and reference them in there instead. https://fullcalendar.io/docs/installation

 <link href="{{ asset('lib/jquery.min.js') }}" rel="stylesheet">
 <link href="{{ asset('fullcalendar/fullcalendar.js') }}" rel="stylesheet">

Etc. Change the above to the actual structure you are using.

Please or to participate in this conversation.