nginx configuration for elgg 1.9

we discussed (on github and in the community) how to configure elgg 1.9 for nginx previously and i did have a working config file here. however, i recently lost the config file while upgrading the local OS and have not been able to locate a working one in the community here or in github.

when i run the one i grabbed from a discussion in github, i just see 'pageok' in the browser window.

from what i can tell this may be related to a domain routing issue, rather than an nginx mis-configuration.. however, so far, i haven't found the cause of the issue.

can anyone point me in a helpful direction to get 1.9rc7 running with nginx?

  • I´ve tried with @communica configuration, but page doesn´t load (blank page).

    This is the log:

    2015/01/08 07:50:07 [info] 4050#0: *4 epoll_wait() reported that client prematurely closed connection, so upstream connection is closed too (104: Connection reset by peer) while sending request to upstream, client:, server:, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: ""

    Is needed another Nginx or PHP setting?. 

    Thanks @communica for share :)

  • Would be great to accept this pull request to include the nginx reference file in core:

  • I just wrote my own PR on my own instead of asking again to fix the issues with the proposed PR.

  • With @Pawel configuration I obtain a blank page too.

    This is the log: 

    2015/01/09 10:27:37 [info] 1067#0: *24 client closed keepalive connection

    What I´m doing wrong?

  • @Javier I would investigate php deamon logs. Most likely you want to enable logging in php.ini as independent from webserver logs and see what's happening. Might be also issue with php-fpm pool itself. That doesn't strike me as Nginx rewrites issue in your case.

  • @Pawel I´ve set a debug level logging in php-fpm.conf, but no errors are logged.

    I´ve Nginx 1.6.2 and PHP 5.5.9.

    Maybe I´ve to update PHP???

    I´m going crazy... :(

  • Error after upgrading from 1.8 to 1.9, images are showing with a ? but CSS works

    Failed to load resource: the server responded with a status of 404 (Not Found)

    This is related to the nginx.conf but I'm not sure how to fix this.