Skip to content

Commit 2ecefcd

Browse files
committed
Merge pull request #1 from gerardroche/nginx-fixes
Nginx fixes
2 parents eca3849 + ca4e211 commit 2ecefcd

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

php-zend-framework/deploy/nginx.conf

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ http {
2222
# '"$http_user_agent" "$http_x_forwarded_for"';
2323

2424
#access_log logs/access.log main;
25+
access_log off;
2526

2627
sendfile on;
2728
#tcp_nopush on;
@@ -31,6 +32,11 @@ http {
3132

3233
#gzip on;
3334

35+
upstream fastcgi_backend {
36+
server 127.0.0.1:9001;
37+
keepalive 32;
38+
}
39+
3440
server {
3541
listen 8080;
3642
server_name localhost;
@@ -63,14 +69,15 @@ http {
6369
index index.php;
6470

6571
location / {
66-
try_files $uri $uri/ /app.php?$uri&$args;
72+
try_files $uri $uri/ /index.php?$uri&$args;
6773
}
6874

6975
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
7076
#
7177
location ~ \.php$ {
7278
try_files $uri =404;
73-
fastcgi_pass 127.0.0.1:9001;
79+
fastcgi_pass fastcgi_backend;
80+
fastcgi_keep_conn on;
7481
fastcgi_index index.php;
7582
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
7683
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
@@ -122,4 +129,4 @@ http {
122129
# }
123130
#}
124131

125-
}
132+
}

0 commit comments

Comments
 (0)