Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- set $host_path "/var/www";
- server_name localhost;
- root $host_path;
- charset utf-8;
- client_max_body_size 100M;
- sendfile off;
- location / {
- proxy_pass http://frontend:80;
- }
- location @rewrites {
- rewrite ^(.+)$ / last;
- }
- location ~ ^/api/.*$ {
- root $host_path/backend/public;
- index index.php;
- try_files $uri $uri/ /index.php?$query_string;
- }
- location ~ \.php$ {
- root $host_path/backend/public;
- set $parsed_request_uri $request_uri;
- if ($request_uri ~ ^/api/(.*)$ ) {
- set $parsed_request_uri $1?$query_string;
- }
- include fastcgi_params;
- fastcgi_pass backend:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $host_path/public/index.php;
- fastcgi_param REQUEST_URI $parsed_request_uri;
- fastcgi_read_timeout 3000;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement