-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbanners.conf
35 lines (26 loc) · 919 Bytes
/
banners.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
server {
listen 80;
server_name mybannerratatoraddress.ru;
index index.php index.html index.htm;
set $root_path '/srv/www/banners/public';
root $root_path;
access_log /var/log/nginx/banners.access_log;
error_log /var/log/nginx/banners.error_log error;
add_header 'Access-Control-Allow-Origin' "*";
try_files $uri $uri/ @rewrite;
location @rewrite {
rewrite ^/(.*)$ /index.php?_url=/$1;
}
location ~ \.php {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index /index.php;
include /etc/nginx/fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}