[SOLVED] Nginx: Flow gives wrong symlinks

Hey guys!

I have migrated a Flow Application from Apache to Nginx Server. On the old Apache everything worked correctly.
See my default configuration on bottom.

Flow gives the following Image (wrong):

This works:

The difference is that Flow appends the filename of the referenced file.

My nginx config:

server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

#    root /usr/share/nginx/html/Web;
    root /var/www/site/Web;

    location ~ /\. {
        deny all;
        access_log off;
        log_not_found off;

    location = /favicon.ico {
        log_not_found off;
        access_log off;

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;

    location /_Resources/ {
        access_log off;
        log_not_found off;
        expires max;

    fastcgi_param   FLOW_CONTEXT      Development;
    fastcgi_param   FLOW_REWRITEURLS  1;

    location / {
        index index.php index.html index.htm;
        try_files $uri $uri/ /index.php$is_args$args;
        location ~ ^(.*)\.php$ {
            try_files      $uri = 404;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index  index.php;
            fastcgi_param  FLOW_REWRITEURLS 1;
            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
#fastcgi_param DOCUMENT_ROOT $realpath_root;
#fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
            include        fastcgi_params;
            fastcgi_read_timeout 300000;


Can you help me?

Thx, Pat

Do you have any custom settings in regards to resource publishing? And which version is this?

Hi Christian!

Thank you for your answer.

It is TYPO3 Flow 2.3.*
No custom settings for resource publishing.

I think nginx makes the problem

nginx shows an error 404 at the following link
and it works with

It’s the opposite on apache.

You need a rewrite rule equivalent to what we have in .htaccess for resources…

Hi Karsten!

Thank you for your answer!

And how could that look? For other projects, this (my nginx.conf) has always worked without problems.

You have projects running on the same Flow version that work, and this one doesn’t? There must be some difference…

Anyway, this looks like it should work: https://gist.github.com/iwyg/4c8c0c0dec21dcfc8969 - and the comment there shows it’s not needed anymore since Flow 3.0.

Okay, I have installed a fresh VM and it works. I have no idea why.