Permalink
Branch: master
Find file Copy path
b8b9d74 Nov 29, 2018
1 contributor

Users who have contributed to this file

53 lines (45 sloc) 1.93 KB
server {
index index.php index.html;
server_name _;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /application/public;
location ~ ^/intranet/?$ {
rewrite ^.*$ /intranet/index.php redirect;
}
location ~ /module/(.*)/(styles|scripts|imagens)/(.*) {
rewrite ^/module/(.*)/(imagens|scripts|styles)/(.*)$ /intranet/$2/$3 break;
}
location ~ /module/(.*)/(.*) {
rewrite ^/module/(.*/)(.*intranet/.*)$ /$2 redirect;
rewrite ^/module/(.*/)(.*index\.php)$ /$2 redirect;
rewrite ^/module/(.*/)(.*logof\.php)$ /intranet/logof.php redirect;
rewrite ^/module/(.*/)(.*meusdados\.php)$ /intranet/meusdados.php redirect;
rewrite ^/module/(.*/)(.*_xml.*)(\.php)$ /intranet/$2.php redirect;
rewrite ^/module/(.*/)(.*erro_banco\.php)$ /intranet/erro_banco.php redirect;
rewrite ^/module/(.*/)(.*educar_pesquisa_cliente_lst\.php)$ /intranet/educar_pesquisa_cliente_lst.php redirect;
rewrite ^/module/(.*/)(.*educar_pesquisa_obra_lst\.php)$ /intranet/educar_pesquisa_obra_lst.php redirect;
rewrite ^/module/(.*)$ /module/index.php last;
}
location ~ ^(/intranet.*\.php|/modules.*\.php|/module/) {
try_files /index.php =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location ~ \.php {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
}