Skip to content

Commit 29a45e6

Browse files
committed
Create nginx.conf.template
1 parent f4b846e commit 29a45e6

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
upstream docker_slim {
2+
server slim:9000;
3+
}
4+
5+
server {
6+
listen ${NGINX_PORT} default_server;
7+
listen [::]:${NGINX_PORT} ipv6only=on default_server;
8+
#
9+
server_name ${NGINX_HOST} www.${NGINX_HOST};
10+
#
11+
location ~ ^/.well-known/acme-challenge/ {
12+
root /tmp/acme-challenge;
13+
}
14+
#
15+
#location / {
16+
#port_in_redirect off;
17+
#return 301 https://$host$request_uri;
18+
#}
19+
}
20+
21+
server {
22+
#listen 443 ssl http2;
23+
#listen [::]:443 ipv6only=on ssl http2;
24+
#
25+
server_name ${NGINX_HOST} www.${NGINX_HOST};
26+
#
27+
#ssl_certificate /etc/letsencrypt/live/${NGINX_HOST}/fullchain.pem;
28+
#ssl_certificate_key /etc/letsencrypt/live/${NGINX_HOST}/privkey.pem;
29+
#ssl_trusted_certificate /etc/letsencrypt/live/${NGINX_HOST}/chain.pem;
30+
#ssl_dhparam /etc/letsencrypt/ssl-dhparam.pem;
31+
include /etc/letsencrypt/options-ssl-nginx.conf;
32+
33+
root /var/www/html/webapp/public;
34+
index index.php;
35+
36+
location / {
37+
try_files $uri /index.php$is_args$args;
38+
}
39+
40+
location ~ \.php {
41+
try_files $uri =404;
42+
fastcgi_split_path_info ^(.+\.php)(/.+)$;
43+
include fastcgi_params;
44+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
45+
fastcgi_param DOCUMENT_ROOT $document_root;
46+
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
47+
fastcgi_index index.php;
48+
fastcgi_pass docker_slim;
49+
}
50+
#
51+
# deny access to .htaccess vb. files, if Apache's document root
52+
location ~/\. {
53+
deny all;
54+
log_not_found off;
55+
}
56+
#
57+
location ~ /.well-known {
58+
allow all;
59+
}
60+
#
61+
location = /favicon.ico {
62+
log_not_found off;
63+
access_log off;
64+
}
65+
#
66+
location = /robots.txt {
67+
allow all;
68+
log_not_found off;
69+
access_log off;
70+
}
71+
#
72+
access_log off;
73+
error_log /var/log/nginx/${NGINX_HOST}.error.log error;
74+
}

0 commit comments

Comments
 (0)