Greetings! Elgg can work with Nginx? According to my tests, with Nginx has a lot of problems. Many problem...
https://example.org/upgrade.php:
You must update your .htaccess file so that the path is injected into the GET parameter __elgg_uri (you can use install/config/htaccess.dist as a guide).
Why??
My nginx config:
server {
# -------------------------------------------------------------------------- #
# Variables.
# -------------------------------------------------------------------------- #
set $srvUser "web_example_org";
set $srvDomain "example.org";
# -------------------------------------------------------------------------- #
# Server name & IP.
# -------------------------------------------------------------------------- #
listen 443 ssl http2;
server_name example.org;
# -------------------------------------------------------------------------- #
# Logs.
# -------------------------------------------------------------------------- #
error_log "/home/project/web_cbrspc04/.logs/nginx.error.example.org.log";
access_log "/home/project/web_cbrspc04/.logs/nginx.access.example.org.log" main;
# -------------------------------------------------------------------------- #
# Root & index.
# -------------------------------------------------------------------------- #
root "/home/project/web_cbrspc04/domain/public_html";
index index.html index.htm index.php;
# -------------------------------------------------------------------------- #
# SSL.
# -------------------------------------------------------------------------- #
ssl on;
ssl_certificate "/home/project/example.org/example.org.crt";
ssl_certificate_key "/home/global/server.crt.key";
# -------------------------------------------------------------------------- #
# Location.
# -------------------------------------------------------------------------- #
location / {
try_files $uri $uri/ @elgg;
}
location = /rewrite.php {
rewrite ^(.*)$ /install.php;
}
location ~ \.php$ {
try_files $uri @elgg;
fastcgi_pass "unix:/run/php-fpm/$srvDomain.sock";
fastcgi_index "index.php";
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include "/etc/nginx/fastcgi_params";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location @elgg {
fastcgi_pass "unix:/run/php-fpm/$srvDomain.sock";
include "/etc/nginx/fastcgi_params";
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
fastcgi_param SCRIPT_NAME /index.php;
fastcgi_param QUERY_STRING __elgg_uri=$uri&$args;
}
}
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Nikolai Shcherbin@rivervanrain

Nikolai Shcherbin - 1 like
- Kitsune Solar@KitsuneSolar

Kitsune Solar - 0 likes
- Nikolai Shcherbin@rivervanrain

Nikolai Shcherbin - 0 likes
- Kitsune Solar@KitsuneSolar

Kitsune Solar - 0 likes
- Nikolai Shcherbin@rivervanrain

Nikolai Shcherbin - 1 like
- Kitsune Solar@KitsuneSolar

Kitsune Solar - 0 likes
- Nikolai Shcherbin@rivervanrain

Nikolai Shcherbin - 1 like
- Kitsune Solar@KitsuneSolar

Kitsune Solar - 0 likes
- Nikolai Shcherbin@rivervanrain

Nikolai Shcherbin - 2 likes

You must log in to post replies.Seems that your config is correct (docs).
All our Elgg productions works on Nginx w/o any issues.
Can you explain about server errors with more details?
More no information. Logs empty.
I have enabled open_basedir, but when I tested it unplugged. I changed a lot of configuration options. I even just copied nginx config from elgg setup directory. Anyway the exact same error.
But what going on: you can't install Elgg, or other troubles?
When used scheme USER < NGINX [PROXY] < NGINX [PHP-FPM] I can not install elgg. I described the problem, you know. Now I have changed scheme on USER < NGINX [PHP-FPM]. In this scheme, the installation goes okay.
But I want check all functions. I decided to click button "Upgrade" in AdminCP. And instead of update page, I get the error:
You got this message.
Try to go to Upgrades under Configure section. What you see in there?
Problem solved!
The problem was this:
When enabled nginx auth_basic, there is a problem with upgrade.php. Strange ...
Ok. congrats!
Yes exactly. Now again I included auth_basic and again there was a problem.
@RvR thank you for your help and support!!! :)
@Kitsune Solar