-
Notifications
You must be signed in to change notification settings - Fork 3
/
nginx config
41 lines (30 loc) · 1.03 KB
/
nginx config
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
#nginx config
server {
server_name www.registry.test;
return 301 $scheme://registry.test$request_uri;
}
server {
listen *:80;
server_name registry.test ;
root /var/www/registry.test/web;
access_log /var/log/nginx/registry.test.access.log;
error_log /var/log/nginx/registry.test.error.log;
# strip frontend.php/ prefix if it is present
rewrite ^/frontend\.php/?(.*)$ /$1 permanent;
location / {
index frontend.php frontend_dev.php;
try_files $uri @rewriteapp;
}
location @rewriteapp {
rewrite ^(.*)$ /frontend.php/$1 last;
}
location ~ ^/(frontend|frontend_dev)\.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;
fastcgi_param APP_ENV dev;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
}
}