Advertisement
Guest User

Untitled

a guest
Jun 21st, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.91 KB | None | 0 0
  1. server {
  2.  
  3.     listen 80;
  4.  
  5.     server_name dominio.com.br;
  6.     root /var/www/vhosts/projects/dominio.com.br/spa;
  7.     index index.php index.html index.htm;
  8.  
  9.     location / {
  10.         try_files $uri $uri/ /index.html;
  11.     }
  12.  
  13.     location ~ ^/(admin) {
  14.         # Debug output
  15.         #return 200 $uri; add_header Content-Type text/plain;
  16.  
  17.         alias /var/www/vhosts/projects/dominio.com.br/api/public;
  18.         try_files $uri $uri/ @admin;
  19.  
  20.         location ~ \.php$ {
  21.             fastcgi_split_path_info ^(.+\.php)(/.+)$;
  22.             fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
  23.             include fastcgi_params;
  24.             fastcgi_param SCRIPT_FILENAME $document_root/index.php;
  25.         }
  26.     }
  27.  
  28.     location @admin {
  29.         rewrite ^/(.*)$ /admin/index.php?/$1 last;
  30.     }
  31.  
  32.     error_log /var/log/nginx/dominio.com.br.error.log;
  33.     access_log /var/log/nginx/dominio.com.br.access.log;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement