-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathnginx-minimal.conf
49 lines (40 loc) · 1.51 KB
/
nginx-minimal.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
location / {
index $yii_bootstrap;
# Redirect everything that isn't a real file to index.php
try_files $uri $uri/ /$yii_bootstrap?$args;
}
location @ris_tiles_notfound {
fastcgi_split_path_info ^(.+\.php)(.*)$;
# Yii soll Aufrufe von nicht existierenden PHP-Dateien abfangen
set $fsn /$yii_bootstrap;
if (-f $document_root$fastcgi_script_name){
set $fsn $fastcgi_script_name;
}
fastcgi_pass php_pass_default;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fsn;
# PATH_INFO und PATH_TRANSLATED müssen nicht angegeben werden,
# sind aber in RFC 3875 für CGI definiert:
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fsn;
}
location /tiles {
# workaround during development:
# proxy_pass http://www.muenchen-transparent.de/;
# proxy_redirect http://www.muenchen-transparent.de/ /tiles/;
error_page 404 =@ris_tiles_notfound;
}
location /pdf_proxy {
proxy_pass http://www.ris-muenchen.de/;
proxy_redirect http://www.ris-muenchen.de/ /pdf_proxy/;
}
location ~ \.php {
include /etc/nginx/fastcgi_params;
fastcgi_pass php_pass_default;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# PATH_INFO und PATH_TRANSLATED müssen nicht angegeben werden,
# sind aber in RFC 3875 für CGI definiert:
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fsn;
try_files $uri =404;
}