Outline ·
[ Standard ] ·
Linear+
Nginx Error, Subfolder
|
TSUbuntuClient
|
Aug 23 2024, 09:15 AM, updated 2y ago
|
|
Hi, I want to set subfolder using nginx but it thrown error. The config here > https://privatebin.net/?ca8735ddfd3ec74a#7g...SkAc1Hg979PMJ9sThe error code as below CODE 2024/08/23 09:11:35 [error] 71702#71702: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 175.143.193.207, server: domain1.com, request: "GET /kekabooboutique/ HTTP/2.0", upstream: "fastcgi://unix:/run/php/php8.0-fpm.sock:", host: "domain1.com" 2024/08/23 09:11:35 [error] 71702#71702: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 175.143.193.207, server: domain1.com, request: "GET /kekabooboutique/ HTTP/2.0", upstream: "fastcgi://unix:/run/php/php8.0-fpm.sock:", host: "domain1.com"
Please advice. Thanks.
|
|
|
|
|
Helpdesk
|
Aug 23 2024, 09:35 AM
|
Ready to Help
|
you're missing a fastcgi_param declaration in your php location block.
also check on your php-fpm socket permissions. It usually defaults to apache, it will need to match your nginx user/group.
|
|
|
|
|
|
TSUbuntuClient
|
Aug 23 2024, 11:16 AM
|
|
This code CODE location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/run/php/php8.0-fpm.sock; fastcgi_index index.php; include fastcgi.conf; } run on others website but no issue.
|
|
|
|
|
|
TSUbuntuClient
|
Aug 23 2024, 04:29 PM
|
|
If i put info.php under domain1.com/info.php , it show the detail.
But when i put under domain1.com/kekabooboutique/info.php, it show error 404.
|
|
|
|
|
|
TSUbuntuClient
|
Aug 23 2024, 06:29 PM
|
|
|
|
|
|
|
|
TSUbuntuClient
|
Aug 23 2024, 11:42 PM
|
|
I can see huge different when test using apache bench on http and https. HTTP CODE Concurrency Level: 10 Time taken for tests: 0.290 seconds Complete requests: 200 Failed requests: 0 Non-2xx responses: 200 Total transferred: 70800 bytes HTML transferred: 32400 bytes Requests per second: 689.81 [#/sec] (mean) Time per request: 14.497 [ms] (mean) Time per request: 1.450 [ms] (mean, across all concurrent requests) Transfer rate: 238.47 [Kbytes/sec] received
HTTPS CODE Concurrency Level: 10 Time taken for tests: 15.374 seconds Complete requests: 200 Failed requests: 196 (Connect: 0, Receive: 0, Length: 196, Exceptions: 0) Total transferred: 40246043 bytes HTML transferred: 40205443 bytes Requests per second: 13.01 [#/sec] (mean) Time per request: 768.688 [ms] (mean) Time per request: 76.869 [ms] (mean, across all concurrent requests) Transfer rate: 2556.49 [Kbytes/sec] received
I already test with enable and disable firewalld but result same. Is it related with ssl cipher or tls on ssl? Please advice. Thanks.
|
|
|
|
|
|
TSUbuntuClient
|
Aug 24 2024, 10:14 AM
|
|
Is there any limit on OS level need to change?
|
|
|
|
|
|
TSUbuntuClient
|
Aug 24 2024, 10:32 AM
|
|
It very huge different https with non-https CODE This is ApacheBench, Version 2.3 <$Revision: 1903618 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking domain1.top (be patient)
Server Software: nginx Server Hostname: domain1.top Server Port: 80
Document Path: / Document Length: 162 bytes
Concurrency Level: 1 Time taken for tests: 0.550 seconds Complete requests: 300 Failed requests: 0 Non-2xx responses: 300 Total transferred: 105000 bytes HTML transferred: 48600 bytes Requests per second: 545.71 [#/sec] (mean) Time per request: 1.832 [ms] (mean) Time per request: 1.832 [ms] (mean, across all concurrent requests) Transfer rate: 186.52 [Kbytes/sec] received
Connection Times (ms) min mean[+/-sd] median max Connect: 1 1 0.2 1 3 Processing: 1 1 0.1 1 2 Waiting: 1 1 0.1 1 2 Total: 1 2 0.3 2 4
Percentage of the requests served within a certain time (ms) 50% 2 66% 2 75% 2 80% 2 90% 2 95% 2 98% 2 99% 3 100% 4 (longest request)
CODE This is ApacheBench, Version 2.3 <$Revision: 1903618 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking domain1.top (be patient)
Server Software: nginx Server Hostname: domain1.top Server Port: 443 SSL/TLS Protocol: TLSv1.3,TLS_AES_256_GCM_SHA384,256,256 Server Temp Key: X25519 253 bits TLS Server Name: domain1.top
Document Path: / Document Length: 0 bytes
Concurrency Level: 1 Time taken for tests: 34.201 seconds Complete requests: 300 Failed requests: 0 Non-2xx responses: 300 Total transferred: 63600 bytes HTML transferred: 0 bytes Requests per second: 8.77 [#/sec] (mean) Time per request: 114.005 [ms] (mean) Time per request: 114.005 [ms] (mean, across all concurrent requests) Transfer rate: 1.82 [Kbytes/sec] received
Connection Times (ms) min mean[+/-sd] median max Connect: 2 3 0.5 3 10 Processing: 97 111 11.2 108 196 Waiting: 97 111 11.2 108 196 Total: 100 114 11.3 110 199
Percentage of the requests served within a certain time (ms) 50% 110 66% 114 75% 116 80% 120 90% 126 95% 133 98% 148 99% 158 100% 199 (longest request)
Why request per sec very big different? This post has been edited by UbuntuClient: Aug 24 2024, 10:32 AM
|
|
|
|
|