-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx_ssl.conf
54 lines (45 loc) · 1.5 KB
/
nginx_ssl.conf
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
server {
listen 80;
server_name example.org;
location / {
return 301 https://$host$request_uri;
}
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
}
server {
listen 443 ssl;
server_name example.org;
client_max_body_size 520M;
access_log /var/log/nginx/application.access.log;
error_log "/var/log/nginx/error.log" debug;
root /var/www/nosh/public;
index index.html index.htm index.php
charset utf-8;
location / {
try_files $uri $uri/ /index.php$is_args$args;
location ~ \.php$ {
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_pass app-nosh:9000;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
add_header X-request_filename "$request_filename" always;
add_header X-fastcgi_script_name "$fastcgi_script_name" always;
add_header X-document_root "$document_root" always;
}
}
location ~ /\.ht {
deny all;
}
ssl_certificate /etc/letsencrypt/live/example.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.org/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}