server { listen 80; server_name ws4.pacsonline.cn; rewrite ^(.*)$ https://${server_name}$1 permanent; } log_format ws4log '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"' '- header: "$http_header"- "$http_zskk_token" '; server { underscores_in_headers on; server_name ws4.pacsonline.cn; listen 1443; access_log /data/logs/nginx/wechat/saccess.log ws4log; error_log /data/logs/nginx/wechat/serror.log; index index.html index.php; client_max_body_size 1024m; root /data/gitcode/server/wechat/public; location / { if (!-e $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; break; } } location ^~ /uploads/ { root /data/gitcode/server/ris/server/public; } location ~ \.(js|css|gif|jpg|jpeg|png|html)$ { root /data/gitcode/server/wechat/public; } location ~ \.php { include fastcgi_params; set $script $uri; set $path_info ""; if ($uri ~ "^(.+\.php)(/.+)") { set $script $1; set $path_info $2; } fastcgi_read_timeout 120; fastcgi_pass 127.0.0.1:9000; # fastcgi_pass unix:/usr/local/php/var/run/php-fpm.sock; fastcgi_index index.php; #fastcgi_index index.php?IF_REWRITE=1; fastcgi_param PATH_INFO $path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; set $real_script_name $fastcgi_script_name; if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") { set $real_script_name $1; set $path_info $2; } fastcgi_param SCRIPT_NAME $real_script_name; #fastcgi_param SCRIPT_NAME $script; #include fastcgi_params; } }