-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx.conf
59 lines (48 loc) · 1.64 KB
/
nginx.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
55
56
57
58
59
user www-data;
worker_processes 10;
pid /var/run/nginx.pid;
error_log /mnt/logs/error.log warn;
events {
worker_connections 1024;
}
http {
index index.html index.php;
default_type text/plain;
sendfile on;
tcp_nopush on;
log_format main '$remote_addr - $remote_user [$time_local] $status '
'"$request" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /mnt/logs/access.log main;
server {
listen 80;
listen [::]:80;
location / {
return 301 https://$host$request_uri;
}
location /.well-known/acme-challenge/ {
root /mnt/certbot/www;
}
}
server {
listen 443 ssl;
listen [::]:443 ssl;
root /mnt/www;
include /mnt/certbot/conf/options-ssl-nginx.conf;
ssl_dhparam /mnt/certbot/conf/ssl-dhparams.pem;
########################################################################
# TODO: replace with your domain
server_name one.domain;
# TODO: replace with your domain
ssl_certificate /mnt/certbot/conf/live/one.domain/fullchain.pem;
ssl_certificate_key /mnt/certbot/conf/live/one.domain/privkey.pem;
########################################################################
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass php:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
}
}
}