Nginx: reverse proxy conf

include proxy_params;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
---------------------------------------------
        proxy_redirect off;
        proxy_set_header Sec-WebSocket-Protocol mqtt;
        more_clear_headers Sec-WebSocket-Protocol;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
---------------------------------------------
   location ~ [^/].php(/|$) {
        fastcgi_split_path_info ^(.+?.php)(/.*)$;
        
        if (!-f $document_root$fastcgi_script_name) {
            return 404;
        }
    
        include fastcgi_params;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass unix:/run/php/php7.2-fpm.sock;
        fastcgi_read_timeout 300;
    }
阅读剩余
THE END