server { server_name padrao.com webserver; root /app/httpdocs; index index.html index.php; # set expiration of assets to MAX for caching location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ { expires max; log_not_found off; } location / { # Check if a file exists, or route it to index.php. try_files $uri $uri/ /index.php$is_args$args; } #location ~ ^([^.\?]*[^/])$ { # try_files $uri @addslash; #} location ~* (admin|operator)$ { try_files $uri @addslash; } location @addslash { return 301 $uri/; } location ~* \.php$ { fastcgi_pass php:9000; fastcgi_index index.php; fastcgi_split_path_info ^(.+\.php)(.*)$; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } }