Welcome Guest ( Log In | Register )

Bump Topic Topic Closed RSS Feed

Outline · [ Standard ] · Linear+

 Nginx Error, Subfolder

views
     
TSUbuntuClient
post Aug 23 2024, 09:15 AM, updated 2y ago

Regular
******
Senior Member
1,417 posts

Joined: Jun 2007
From: /puchong/cyberjaya/klang



Hi,

I want to set subfolder using nginx but it thrown error.

The config here > https://privatebin.net/?ca8735ddfd3ec74a#7g...SkAc1Hg979PMJ9s

The 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
post Aug 23 2024, 09:35 AM

Ready to Help
Group Icon
Forum Admin
3 posts

Joined: Sep 2012

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
post Aug 23 2024, 11:16 AM

Regular
******
Senior Member
1,417 posts

Joined: Jun 2007
From: /puchong/cyberjaya/klang



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
post Aug 23 2024, 04:29 PM

Regular
******
Senior Member
1,417 posts

Joined: Jun 2007
From: /puchong/cyberjaya/klang



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
post Aug 23 2024, 06:29 PM

Regular
******
Senior Member
1,417 posts

Joined: Jun 2007
From: /puchong/cyberjaya/klang



I have comment out some and it's working now.
https://privatebin.arch-linux.cz/?e89d1664a...qvqn2SmXkAdiUvn
TSUbuntuClient
post Aug 23 2024, 11:42 PM

Regular
******
Senior Member
1,417 posts

Joined: Jun 2007
From: /puchong/cyberjaya/klang



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
post Aug 24 2024, 10:14 AM

Regular
******
Senior Member
1,417 posts

Joined: Jun 2007
From: /puchong/cyberjaya/klang



Is there any limit on OS level need to change?
TSUbuntuClient
post Aug 24 2024, 10:32 AM

Regular
******
Senior Member
1,417 posts

Joined: Jun 2007
From: /puchong/cyberjaya/klang



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

Topic ClosedOptions
 

Change to:
| Lo-Fi Version
0.0138sec    0.56    5 queries    GZIP Disabled
Time is now: 21st December 2025 - 09:15 PM