-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnginx.conf
More file actions
105 lines (97 loc) · 3.05 KB
/
nginx.conf
File metadata and controls
105 lines (97 loc) · 3.05 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# vim: ft=nginx
# nginx.conf
# itvends/web
#
# Nginx configuration file. Symlink into /etc/nginx/conf.d/
## Enforce SSL
server {
listen [::]:80;
server_name itvends.com *.itvends.com it-vends.com *.it-vends.com;
include well-known.conf;
location / {
rewrite ^ https://$server_name$request_uri? permanent;
}
}
## It Vends!
server {
listen [::]:443 ssl;
server_name itvends.com it-vends.com, www.itvends.com, www.it-vends.com;
ssl_certificate /etc/letsencrypt/live/itvends.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/itvends.com/privkey.pem;
add_header Strict-Transport-Security "max-age=31536000;";
root /data/html/itvends/itvends.com;
location / {
index index.php index.html index.htm;
try_files $uri/index.html $uri.html $uri/ $uri @php =404;
}
# External link forwards
rewrite ^/(plus|\+)$ https://plus.google.com/b/114734030767381414604/114734030767381414604;
rewrite ^/(g(it(hub)?)?|s(ource)?)$ https://github.com/eugenekay/it-vends;
# IRC Logs
location /irc {
autoindex on;
location ~ \.log$ {
add_header Content-Type text/plain;
}
}
# Serve PHP files
location @php {
rewrite ^(.+)$ $1.php last;
}
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/php-fpm/itvends.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME "$document_root$fastcgi_script_name";
fastcgi_split_path_info ^(.+\.php)(.*)$;
}
}
## Tracker
server {
listen [::]:443 ssl;
server_name tracker.itvends.com;
ssl_certificate /etc/letsencrypt/live/tracker.itvends.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/tracker.itvends.com/privkey.pem;
add_header Strict-Transport-Security "max-age=31536000;";
location / {
proxy_pass http://localhost6:6969;
}
}
## Tor
server {
listen localhost4:10080;
server_name itvendskabe5uhy7.onion;
root /data/html/itvends/itvends.com;
location / {
index index.php index.html index.htm;
try_files $uri/index.html $uri.html $uri/ $uri @php =404;
}
# Serve PHP files
location @php {
rewrite ^(.+)$ $1.php last;
}
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/php-fpm/itvends.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME "$document_root$fastcgi_script_name";
fastcgi_split_path_info ^(.+\.php)(.*)$;
}
}
## ZNC
server {
listen [::]:443 ssl;
server_name znc.itvends.com;
ssl_certificate /etc/letsencrypt/live/znc.itvends.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/znc.itvends.com/privkey.pem;
add_header Strict-Transport-Security "max-age=31536000;";
location / {
proxy_pass http://localhost4:50080;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_read_timeout 3600;
}
}