-
Notifications
You must be signed in to change notification settings - Fork 3
/
nginx.conf
44 lines (35 loc) · 1014 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
39
40
41
42
43
44
server {
listen 80;
server_name fakebsod.com;
root /usr/share/nginx/html;
index index.php index.html index.htm;
absolute_redirect off;
# Custom rewrites
location /generic/ {
rewrite ^/generic/$ /pages/generic.php last;
}
location /generic {
return 301 /generic/$is_args$args;
}
location /windows-8-and-10/ {
rewrite ^/windows-8-and-10/$ /pages/windows-8-and-10.php last;
}
location /windows-8-and-10 {
return 301 /windows-8-and-10/$is_args$args;
}
# Pass PHP scripts to PHP-FPM
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php-fpm:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
# Default catch-all
location / {
try_files $uri $uri/ =404;
}
error_page 404 /404.php;
}