forked from Zyahko/RealDeviceMap-RaidBillBoard
-
Notifications
You must be signed in to change notification settings - Fork 15
/
nginx.example.conf
72 lines (60 loc) · 1.84 KB
/
nginx.example.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
63
64
65
66
67
68
69
70
71
72
server {
listen 80;
server_name DOMAINNAME;
# Some Basic lockdown of folders and files
# Lock folders
location ~ /(\.|cron|lib|LICENSE)
{
return 444;
}
# Lock Extensions
location ~* \.(conf|md|sql)
{
return 444;
}
rewrite ^/dashboard /index.php?page=dashboard last;
rewrite ^/raids /index.php?page=raids last;
rewrite ^/gyms /index.php?page=gyms last;
rewrite ^/quests /index.php?page=quests last;
rewrite ^/pokestops /index.php?page=pokestops last;
rewrite ^/pokemon /index.php?page=pokemon last;
rewrite ^/nests /index.php?page=nests last;
rewrite ^/stats /index.php?page=stats last;
#charset koi8-r;
error_log /var/log/nginx/error.log warn;
#access_log logs/host.access.log main;
location / {
include /etc/nginx/mime.types;
root /PATH/TO/RDMOPOLE;
index index.php index.html index.htm;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
# redirect server error pages to the static page /50x.html
#
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root /PATH/TO/RDMOPOLE;
try_files $uri =404;
fastcgi_pass unix:/var/run/php-main.socket;
fastcgi_index index.php;
fastcgi_param HTTP_IF_NONE_MATCH $http_if_none_match;
fastcgi_param HTTP_IF_MODIFIED_SINCE $http_if_modified_since;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}