From 4b995bcdf4527679aa75ee5396eb88c5f6273dd0 Mon Sep 17 00:00:00 2001 From: Ivan Grynenko Date: Sun, 12 Jun 2016 18:54:40 +1000 Subject: [PATCH] Fixing nginx location. --- lemp-rhel7/group_vars/all.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lemp-rhel7/group_vars/all.yml b/lemp-rhel7/group_vars/all.yml index d829f80..0abc37e 100644 --- a/lemp-rhel7/group_vars/all.yml +++ b/lemp-rhel7/group_vars/all.yml @@ -106,6 +106,14 @@ nginx_vhosts: access_log: "/var/log/nginx/{{ server_hostname }}_access.log" error_log: "/var/log/nginx/{{ server_hostname }}_error.log" extra_parameters: | + location / { + index index.php; + try_files $uri $uri/ @rewrite; + expires max; + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1 last; + } location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000;