-
Notifications
You must be signed in to change notification settings - Fork 0
/
project-dev
31 lines (25 loc) · 875 Bytes
/
project-dev
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
server {
# we want to listen on port 80 on all IPs on our system - both IPv4 and IPv6
listen 8080;
set $branch dev;
# where are our site files stored?
root /var/www/project_${branch}/web;
index index.php;
access_log /var/log/nginx/project_${branch}_access.log;
error_log /var/log/nginx/project_${branch}_error.log;
# Deny all . files
location ~ /\. {
deny all;
}
location / {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
# With php5-cgi alone:
fastcgi_pass 127.0.0.1:9000;
# With php5-fpm:
#fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}