12345678910111213141516171819202122232425262728293031323334 |
- upstream php-upstream {
- server unix:/var/run/php/php5-fpm.sock;
- }
- server {
- listen 80;
- root /var/www/app;
- index index.php index.html index.htm;
- server_name milkyway.guern.eu;
- sendfile off;
- # add locations for static files to not forward these requests to PHP
- location ~* \.(css|js|png|gif) {
- alias /var/www/app/admin/dist;
- try_files $uri uri/ =404;
- }
- location /api {
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME /var/www/app/api/index.php;
- fastcgi_pass php-upstream;
- }
- location /admin {
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME /var/www/app/index.php;
- fastcgi_pass php-upstream;
- }
- location / {
- try_files $uri =404;
- }
- }
|