1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- #user nobody;
- worker_processes 8;
- #error_log logs/error.log;
- #error_log logs/error.log notice;
- #error_log logs/error.log info;
- error_log stderr error;
- #pid logs/nginx.pid;
- events {
- worker_connections 1024;
- }
- http {
- include /usr/local/nginx/conf/mime.types;
- default_type application/octet-stream;
- #access_log logs/access.log main;
- access_log off;
- sendfile on;
- #tcp_nopush on;
- #keepalive_timeout 0;
- keepalive_timeout 65;
- #gzip on;
- upstream fastcgi_backend {
- server 127.0.0.1:9001;
- keepalive 32;
- }
- server {
- listen 8080;
- server_name localhost;
- root /home/tfb/FrameworkBenchmarks/php-yii2/app;
- index index.php;
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
- # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
- #
- location ~ \.php$ {
- fastcgi_split_path_info ^(.+\.php)(.*)$;
- fastcgi_pass fastcgi_backend;
- fastcgi_keep_conn on;
- set $fsn /index.php;
- if (-f $document_root$fastcgi_script_name){
- set $fsn $fastcgi_script_name;
- }
- fastcgi_param SCRIPT_FILENAME $document_root$fsn;
- #PATH_INFO and PATH_TRANSLATED can be omitted, but RFC 3875 specifies them for CGI
- fastcgi_param PATH_INFO $fastcgi_path_info;
- fastcgi_param PATH_TRANSLATED $document_root$fsn;
- include /usr/local/nginx/conf/fastcgi_params;
- }
- }
- }
|