Add nginx configuration infos

I’m struggling to find official ressources on how to configure nginx properly with neos or flow. I often see people ask about this topic in the slack channels too.
It would be great if you could add nginx along with the apache configuration notes here http://neos.readthedocs.org/en/stable/GettingStarted/Installation.html#fundamental-installation

I found a related ticket with a default nginx config in gerrit but it seems Resources/Private/Installer/Distribution/Defaults/Web/.nginx.conf is missing in the new neos beta6 release. So i am wondering if it isn’t up to date anymore or why it got removed.

1 Like

The change you found is just not merged yet. I think it needs an update with some specifics but could still go in 2.0 of course. Just not that high on the priority list. Would you check if the config in the change would work, eventually update it and ping me so we can get this in?

I’m afraid that at the moment i have a litte bit trouble to get it running.
Has anybody already a running nginx system and can share some insights?

yes, here same problem to running a powerful and stable nginx configuration for neos.
Greeting and thanks for this great CMS

@stefkey

This is my own nginx cofiguration. Included files following below

Vhost

server {
    listen       80;
    server_name  project.sma;

    root       /Users/soren/Sites/project/Web;

    include /usr/local/etc/nginx/conf.d/flow-3.0-settings;
    include /usr/local/etc/nginx/conf.d/flow-context-development;

    access_log  /usr/local/etc/nginx/logs/default.access.log  main;

    include   /usr/local/etc/nginx/conf.d/php-fpm;

} 

flow-3.0.settings

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;
    break;
}

flow-context-development

fastcgi_param   FLOW_CONTEXT      Development;
fastcgi_param   FLOW_REWRITEURLS  1;

php-fpm

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   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param FLOW_REWRITEURLS 1;
                fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include        fastcgi_params;
        }
}

The same configuration can be used for other Flow based projects.

I hope this helps :slight_smile:

Hi, I have many php errors like this
child 27440 exited on signal 6 (SIGABRT) after 16.954250 seconds from start
when I use neos. I don’t found the solution. Can someone post his nginx (and php) setting?