This repository was archived by the owner on May 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
71 lines (61 loc) · 2.58 KB
/
nginx.conf
File metadata and controls
71 lines (61 loc) · 2.58 KB
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
63
64
65
66
67
68
69
70
71
#######################
#---------------------#
# A+ SSL NGINX CONFIG #
# --- By Null-Dev --- #
#---------------------#
#######################
server {
listen 80;
server_name epticmc.com;
location / { return 301 https://epticmc.com$request_uri; }
location ~ /.well-known { allow all; }
}
server {
listen 443 ssl default_server;
spdy_keepalive_timeout 300;
spdy_headers_comp 9;
add_header X-Content-Type-Options nosniff;
add_header Strict-Transport-Security 'max-age=31536000; preload';
root /var/www/epticmc.com/public_html;
index index.html index.htm index.php;
server_name epticmc.com;
ssl on;
ssl_certificate /etc/letsencrypt/live/epticmc.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/epticmc.com/privkey.pem;
ssl_protocols TLSv1.2;
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.4.4 8.8.8.8 valid=300s;
resolver_timeout 10s;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 24h;
ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/nginx/ssl/dhparam.pem;
location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|store) {
deny all;
return 403;
}
location /wbb/ {
index index.php;
try_files $uri $uri/ /wbb/index.php?$uri&$args;
}
location ~* \.(gif|jpe?g|png|css)$ { expires 30d; }
location /video { autoindex on; }
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location /report { return 301 https://epticmc.com/board/14-reports; }
location /apply { return 301 https://epticmc.com/board/16-applications; }
location /appeal { return 301 https://epticmc.com/board/19-new-appeals; }
location /help { return 301 https://epticmc.com/board/31-support; }
location / {
index index.php;
try_files $uri $uri/ /index.php?$uri&$args;
}
}