Hello!
I'm trying to setup a Elgg server with nginx + php fpm. Everything seems to work but I can't pass the installation. I get stuck at the start with the error:
We think your server is running the Nginx web server.
The rewrite rules test failed. You need to configure your web server with Elgg's rewrite rules and try again.
I tried the rewrite rules suggested in: http://community.elgg.org/pg/forum/topic/721005/elgg-blog-elgg-18-beta1-released/
And: http://docs.elgg.org/wiki/Elgg_and_nginx
But it didn't work out. Any ideas?
My current site config:
location ~ ^/cache/ { rewrite ^/cache\/(.*)$ /engine/handlers/cache_handler.php?request=$1&$args; } location ~* ^/pg/(css|js) { rewrite ^/pg\/([A-Za-z0-9\_\-]+)$ /engine/handlers/page_handler.php?handler=$1&$args; rewrite ^/pg\/([A-Za-z0-9\_\-]+)\/(.*)$ /engine/handlers/page_handler.php?handler=$1&page=$2&$args; } # For all other requests, try the file, or rewrite if it's PHP location / { try_files $uri $uri/ @rewrite; } location @rewrite { rewrite rewrite\.php$ install.php last; rewrite ^/tag\/(.+)\/?$ /engine/handlers/page_handler.php?handler=search&page=$1; rewrite ^/action\/([A-Za-z0-9\_\-\/]+)$ /engine/handlers/action_handler.php?action=$1&$args; rewrite ^/services\/api\/([A-Za-z0-9\_\-]+)\/(.*)$ /engine/handlers/service_handler.php?handler=$1&request=$2&$args; rewrite ^/export\/([A-Za-z]+)\/([0-9]+)\/?$ /engine/handlers/export_handler.php?view=$1&guid=$2; rewrite ^/export\/([A-Za-z]+)\/([0-9]+)\/([A-Za-z]+)\/([A-Za-z0-9\_]+)\/$ /engine/handlers/export_handler.php?view=$1&guid=$2&type=$3&idname=$4; rewrite /xml-rpc.php /engine/handlers/xml-rpc_handler.php; rewrite /mt/mt-xmlrpc.cgi /engine/handlers/xml-rpc_handler.php; rewrite ^/rewrite.php$ /install.php; if (!-d $request_filename){ set $rule_11 1$rule_11; } if (!-f $request_filename){ set $rule_11 2$rule_11; } if ($rule_11 = "21"){ rewrite ^/([A-Za-z0-9\_\-]+)$ /engine/handlers/page_handler.php?handler=$1; } if (!-d $request_filename){ set $rule_12 1$rule_12; } if (!-f $request_filename){ set $rule_12 2$rule_12; } if ($rule_12 = "21"){ rewrite ^/([A-Za-z0-9\_\-]+)\/(.*)$ /engine/handlers/page_handler.php?handler=$1&page=$2; } }
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.
- 昂乐@xurx
昂乐 - 0 likes
- 昂乐@xurx
昂乐 - 0 likes
- Martijn@raggar
Martijn - 0 likes
You must log in to post replies.I have the same problem. We need help.
I fixed this using the config file from http://thomas.deuling.org/2012/01/elgg-community-1-8-2-rewrite-rules-for-nginx/.
Thanks! Works like a charm :)
Maybe an idea to put this on the wiki on: http://docs.elgg.org/wiki/Elgg_and_nginx