| server_name ###SERVERNAME###; |
| access_log /var/log/nginx/red.log; |
| client_max_body_size 20m; |
| client_body_buffer_size 128k; |
| rewrite ^/(.*) /index.php?q=$uri&$args last; |
| rewrite ^/(.*) /index.php?q=$uri last; |
| location ^~ /.well-known/ { |
| rewrite ^/(.*) /index.php?q=$uri&$args last; |
| # statically serve these file types when possible |
| # otherwise fall back to front controller |
| # allow browser to cache them |
| # added .htm for advanced source code editor library |
| location ~* \.(jpg|jpeg|gif|png|ico|css|js|htm|html|map|ttf|woff|woff2|svg)$ { |
| try_files $uri /index.php?q=$uri&$args; |
| location ~* \.(tpl|md|tgz|log|out)$ { |
| # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 |
| # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini |
| fastcgi_split_path_info ^(.+\.php)(/.+)$; |
| fastcgi_pass 127.0.0.1:9000; |
| #fastcgi_pass unix:/var/run/php5-fpm.sock; |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
| # deny access to all dot files |