forked from perec007/site-php5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
39 lines (31 loc) · 953 Bytes
/
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
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
include mime.types;
server {
listen 0.0.0.0:80 default_server;
server_name default;
location ~* \.(js|JPG|css|jpg|png|jpeg|gif|zip|tgz|gz|rar|doc|xls|exe|pdf|ppt|txt|wav|bmp|rtf)$ {
expires 1d;
#open_file_cache_errors off;
root /var/www/html;
}
location / {
proxy_pass http://127.0.0.1:81;
proxy_buffer_size 8k;
set_real_ip_from 172.17.0.0/16;
real_ip_header X-Forwarded-For;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
}