-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwxapp.conf
62 lines (48 loc) · 1.41 KB
/
wxapp.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
60
61
62
server {
server_name wxapp.umd-cssa.org www.wxapp.umd-cssa.org;
root /usr/share/nginx/wxapp/root;
gzip on;
gzip_comp_level 7; # 1-9
gzip_min_length 256;
# proxy to back end api sever
location /api/ {
proxy_pass http://localhost:6006/;
}
# php
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
# Git folder vulnerability
location /.git {
deny all;
return 403;
}
# deny access to .htaccess files
location ~ /\.ht {
deny all;
return 403;
}
access_log /var/log/nginx/$host-access.log;
error_log /var/log/nginx/wxapp-error.log;
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/umd-cssa.org/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/umd-cssa.org/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = wxapp.umd-cssa.org) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name wxapp.umd-cssa.org www.wxapp.umd-cssa.org;
return 404; # managed by Certbot
}
# deleted lines
# index index.php index.html index.htm;
# try_files $uri $uri/index.html;
# location ~ /favicon.ico {
# access_log off;
# log_not_found off;
# }