-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdefault.conf.template
59 lines (46 loc) · 1.62 KB
/
default.conf.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
server {
listen [::]:80;
listen 80;
server_name ${NGINX_SERVER_NAME};
return 301 https://$host$request_uri;
}
server {
listen [::]:443 ssl;
listen 443 ssl;
http2 on;
server_name ${NGINX_SERVER_NAME};
root /app/public;
index index.php;
charset utf-8;
ssl_certificate /etc/nginx/ssl/live/${APP_HOST}/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/${APP_HOST}/privkey.pem;
gzip on;
gzip_comp_level 5;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml application/wasm application/octet-stream;
add_header X-Frame-Options "ALLOWALL";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
add_header Access-Control-Allow-Origin *;
add_header X-Request-ID $request_id;
client_max_body_size 100m;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass ${COMPOSE_PROJECT_NAME}.php-fpm:9000;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log timings;
}