123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #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;
- }
- 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;
- 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;
- }
- }
- }
|