Cant load assets after moving to live server

Hey Guys,
I`m doing my first project and I build a structure local on my mac. I pushed this to my GitLab Server and pulled it on a webserver.

After composer install, I was able to complete the setup (without css styles) the database but i`m not able to load Assets from the _Resources/Static/Packages/ folder.

My Setup looks like that:

  • My Url is pointing in the Web folder
  • The htaccess is unchanged (do i need to change something?)

I can start the Server without errors.

If I am right, there are Symlinks for these assets and the permissions are fine. But i get 403 Errors for all assets. Is there a way to fix it? Or do I have to take another way to publish the project on live Server?

Thanks for help!

Hi Finn

I’m not sure but maybe you have a problem with your file permissions.

I would try to execute this command: ./flow flow:core:setfilepermissions

Maybe ./flow resource:publish could help too.

Thanks, i tried it but its still the same. Also tried to delete the resources and published them again. But still 403. The Permissions also looking good.

I have no idea because its a fresh installation comming from my GitLab.

Do i have to set domain settings if i move to live system?

hmm ok, next thing could be the server. It’s an apache, or nginx?

For apache the default .htaccess should do the job.
But for nginx you should take a look at the documentation for nginx ( 3. Virtual domain/host ): Manual Setup with a web server (Linux/Mac OS) - Installation & Development Setup - Neos CMS - Neos Docs

Do i have to set domain settings if i move to live system?

If you mean the domain settings in neos for the site: If there is a problem, you would expect an 404 instead of 403 and links wouldn’t work.

Its Apache.

If you mean the domain settings in neos for the site: If there is a problem, you would expect an 404 instead of 403 and links wouldn’t work.

Good to know!

I pulled it again and if I go to the database setup I get the styles in the first load. But after the automatic reload I get the 403 Errors.

Now the database setup looks like this: http://relaunch.zahnarzt-friedrichs.de/setup/login

maybe this could help:

1 Like

The interesting thing is, that I get the same problem if I just install Neos with composer. I first thought its about my GitLab version, but its the same with a clean install.

Thank you kimholberg!

I finally fixed it by adding this to the settings.yaml

Neos:
  Flow:
    resource:
      targets:
        localWebDirectoryPersistentResourcesTarget:
          target: 'Neos\Flow\ResourceManagement\Target\FileSystemSymlinkTarget'
          targetOptions:
            relativeSymlinks: true
        localWebDirectoryStaticResourcesTarget:
          target: 'Neos\Flow\ResourceManagement\Target\FileSystemSymlinkTarget'
          targetOptions:
            relativeSymlinks: true
2 Likes