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

raffelustig's avatar

In a deployed laravel system the logotype won't show

The system is here: http://shoot.mywire.org/app/ It's on a ubuntu 20.04 system with apache2.

I have done the php artisan storage:link and stored a couple of logos but they won't show. In a local system it works fine. In the square with a question mark in it, if I choose "Open image in a new tab" I'm getting this:

Forbidden
You don't have permission to access this resource.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

but I have world read permissions all the way to the logos. /storage/app/public/clubs/45/logo.png

In the local system: http://127.0.0.1:8000/storage/clubs/45/landskrona-pistolklubb-logo.png the logo shows In the deployed system: http://shoot.mywire.org/storage/clubs/45/landskrona-pistolklubb-logo.png error.

What could be wrong and why it differs from the local system?

0 likes
2 replies
inalto's avatar

You can also check:

1 - The apache root dir should point to the /home/user/laraveapp/public/

2 - Check AllowOverride All in your virtualhost:

Example

<VirtualHost *:80>
  ServerName shoot.mywire.org
  ServerAlias www.shoot.mywire.org shoot.mywire.org
  DocumentRoot "/home/shoot/public_html/public"
  <Directory "/home/shoot/public_html/public">
    AllowOverride all
    Require all granted
    Allow from all
    Order allow,deny
   Options +Indexes
  </Directory>
  <Proxy "unix:/var/run/php-fpm/shoot80.sock|fcgi://php-fpm">
     ProxySet disablereuse=off
  </Proxy>
  <FilesMatch \.php$>
     SetHandler proxy:fcgi://php-fpm
  </FilesMatch>
  <IfModule mod_headers.c>
      Header unset Strict-Transport-Security
      Header always set Strict-Transport-Security "max-age=0;includeSubDomains"
  </IfModule>
ErrorLog /home/shoot/error.log
TransferLog /home/shoot/transfer.log
</VirtualHost>

3 - Check via command line that the symbolic link is set (permissions are in php-fpm case) also public need to have at least 755 permission

cd public
ls -als stor*
0 lrwxrwxrwx 1 shoot shoot 43 25 mag  2021 storage -> /home/inalto/public_html/storage/app/public

4 - Check in apache conf that you have Options FollowSymLinks

Hope it helps :)

raffelustig's avatar
raffelustig
OP
Best Answer
Level 2

I found the solution.

Step 1

remove the storage link from the public folder.

Step 2

Give permission to the storage folder

chmod -R 775 storage/

Step 3

Create the sym link

php artisan storage:link

then change owner to the storage link and after that it works!

Please or to participate in this conversation.