initital commit
This commit is contained in:
33
docker/nginx/default.conf
Normal file
33
docker/nginx/default.conf
Normal file
@@ -0,0 +1,33 @@
|
||||
limit_req_zone $binary_remote_addr zone=limiter:10m rate=60r/m;
|
||||
|
||||
server {
|
||||
index index.php index.html;
|
||||
server_name symfony_example_app;
|
||||
error_log stderr debug;
|
||||
access_log stderr;
|
||||
listen 80;
|
||||
root /var/www/html/public;
|
||||
|
||||
location = /errors/rate-limiting.json {
|
||||
root /var/www/html/public;
|
||||
internal;
|
||||
}
|
||||
|
||||
location /api {
|
||||
limit_req zone=limiter burst=10 nodelay;
|
||||
limit_req_status 429;
|
||||
try_files $uri /index.php$is_args$args;
|
||||
}
|
||||
|
||||
error_page 429 /errors/rate-limiting.json;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ ^/.+\.php(/|$) {
|
||||
fastcgi_pass php-fpm:9000;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user