Skip to content

Instantly share code, notes, and snippets.

@ScullWM
Created June 19, 2018 15:16
Show Gist options
  • Save ScullWM/c21c07bfbbcb1f6826d824228a5baa74 to your computer and use it in GitHub Desktop.
Save ScullWM/c21c07bfbbcb1f6826d824228a5baa74 to your computer and use it in GitHub Desktop.
debug_api_mirror
server {
server_name symfony.localhost;
root /var/www/symfony/public;
location / {
try_files $uri @rewriteapp;
}
location @rewriteapp {
rewrite ^(.*)$ /index.php/$1 last;
}
location ~ ^/index\.php(/|$) {
fastcgi_pass php-upstream;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
post_action @debug_api_mirror;
}
location @debug_api_mirror {
internal;
proxy_pass http://tdb-proxy-test5:7000;
proxy_redirect off;
client_max_body_size 100m;
client_body_buffer_size 128k;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass_header Server;
proxy_read_timeout 30m;
proxy_send_timeout 30m;
}
error_log /var/log/nginx/symfony_error.log;
access_log /var/log/nginx/symfony_access.log;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment