404 Not Found while accessing the file

Kaushal Shriyan kaushalshriyan at gmail.com
Tue Aug 3 15:43:06 UTC 2021


On Mon, Aug 2, 2021 at 11:18 PM Maxim Dounin <mdounin at mdounin.ru> wrote:

> Hello!
>
> On Mon, Aug 02, 2021 at 09:12:59PM +0530, Kaushal Shriyan wrote:
>
> > I am running nginx version: nginx/1.20.1 on CentOS Linux release 7.9.2009
> > (Core). When I am accessing
> >
> https://dsmadeveloperportal.mydomain.com/sites/default/files/2020-08/dsmaAccount%20and%20Transaction%20API%20Specification_2_1.yml
> ,
> > I am encountering  404 Not Found while accessing it. On the server, the
> > file is there
> >
> > #ls -l
> >
> "/var/www/html/dacdeveloperportal/web/sites/default/files/2020-08/dsmaAccount
> > and Transaction API Specification_2_1.yml"
> > -rwxrwxrwx 1 nginx nginx 418867 Aug  2 05:21
> >
> /var/www/html/dacdeveloperportal/web/sites/default/files/2020-08/dsmaAccount
> > and Transaction API Specification_2_1.yml
>
> [...]
>
> > root /var/www/html/dsmadeveloperportal/web;
>
> Note this does not match the file location, "dsma" vs "dac".
>
> Note well that additional useful information can be found in nginx
> error log.  Looking into error log usually greatly simplifies
> debugging problems like this.
>
> --
> Maxim Dounin
> http://mdounin.ru/
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx


Hi Maxim,

Thanks for the email. Apologies for sharing the incorrect file path, there
was a typo error in the file path. Please ignore it.
The correct file path is as below:-

#ls -l
"/var/www/html/dsmadeveloperportal/web/sites/default/files/2021-08/Account%20and%20Transaction%20API%20Specification_2_1.yml"

-rwxrwxrwx 1 nginx nginx 418867 Aug  2 05:21
/var/www/html/dsmadeveloperportal/web/sites/default/files/2021-08/Account%20and%20Transaction%20API%20Specification_2_1.yml

[root at dsmadeveloperportal web]#pwd
/var/www/html/dsmadeveloperportal/web
[root at dsmadeveloperportal web]# ls -l
total 44
-rw-rw-r--  1 nginx nginx  385 Jul 12 14:21 autoload.php
drwxr-xr-x 12 nginx nginx 4096 Jul 28 11:52 core
-rw-r--r--  1 nginx nginx 1507 Jul 28 11:53 example.gitignore
-rw-rw-r--  1 nginx nginx  549 Jul 12 14:21 index.php
-rw-r--r--  1 nginx nginx   95 Jul 28 11:53 INSTALL.txt
drwxrwxr-x  6 nginx nginx   77 Jul 28 11:53 libraries
drwxrwxr-x  4 nginx nginx   69 Jul 28 11:53 modules
drwxrwxr-x  2 nginx nginx   40 Jul 28 11:53 profiles
-rw-r--r--  1 nginx nginx 5924 Jul 28 11:53 README.txt
-rw-rw-r--  1 nginx nginx 1594 Jul 12 14:21 robots.txt
drwxrwxr-x  3 nginx nginx  130 Jul 28 11:53 sites
drwxrwxr-x  4 nginx nginx   69 Jul 28 11:53 themes
-rw-rw-r--  1 nginx nginx  848 Jul 12 14:21 update.php
-rw-rw-r--  1 nginx nginx 4566 Jul 12 14:21 web.config
[root at dacdeveloperportal web]#

I have attached the Nginx web server debug logs along with the Nginx config
files for your reference. Please let me know if you need any additional
information. Thanks in advance and I look forward to hearing from you.
Please comment.

Best Regards,

Kaushal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20210803/e486a252/attachment-0001.htm>
-------------- next part --------------
2021/08/03 09:55:07 [debug] 3406#3406: accept on 0.0.0.0:443, ready: 0
2021/08/03 09:55:07 [debug] 3405#3405: accept on 0.0.0.0:443, ready: 0
2021/08/03 09:55:07 [debug] 3406#3406: accept() not ready (11: Resource temporarily unavailable)
2021/08/03 09:55:07 [debug] 3405#3405: posix_memalign: 0000564F51CCF980:512 @16
2021/08/03 09:55:07 [debug] 3405#3405: *6 accept: 14.98.153.6:65126 fd:15
2021/08/03 09:55:07 [debug] 3405#3405: *6 event timer add: 15: 60000:67098843
2021/08/03 09:55:07 [debug] 3405#3405: *6 reusable connection: 1
2021/08/03 09:55:07 [debug] 3405#3405: *6 epoll add event: fd:15 op:1 ev:80002001
2021/08/03 09:55:07 [debug] 3405#3405: *6 http check ssl handshake
2021/08/03 09:55:07 [debug] 3405#3405: *6 http recv(): 1
2021/08/03 09:55:07 [debug] 3405#3405: *6 https ssl handshake: 0x16
2021/08/03 09:55:07 [debug] 3405#3405: *6 tcp_nodelay
2021/08/03 09:55:07 [debug] 3405#3405: *6 reusable connection: 0
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL server name: "dsmadeveloperportal.mydomain.com"
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL ALPN supported by client: h2
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL ALPN supported by client: http/1.1
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL ALPN selected: http/1.1
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL certificate status callback
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL_do_handshake: -1
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL_get_error: 2
2021/08/03 09:55:07 [debug] 3406#3406: accept on 0.0.0.0:443, ready: 0
2021/08/03 09:55:07 [debug] 3405#3405: accept on 0.0.0.0:443, ready: 0
2021/08/03 09:55:07 [debug] 3406#3406: posix_memalign: 0000564F51D20F70:512 @16
2021/08/03 09:55:07 [debug] 3405#3405: accept() not ready (11: Resource temporarily unavailable)
2021/08/03 09:55:07 [debug] 3406#3406: *7 accept: 14.98.153.6:65127 fd:11
2021/08/03 09:55:07 [debug] 3406#3406: *7 event timer add: 11: 60000:67098847
2021/08/03 09:55:07 [debug] 3406#3406: *7 reusable connection: 1
2021/08/03 09:55:07 [debug] 3406#3406: *7 epoll add event: fd:11 op:1 ev:80002001
2021/08/03 09:55:07 [debug] 3406#3406: *7 http check ssl handshake
2021/08/03 09:55:07 [debug] 3406#3406: *7 http recv(): 1
2021/08/03 09:55:07 [debug] 3406#3406: *7 https ssl handshake: 0x16
2021/08/03 09:55:07 [debug] 3406#3406: *7 tcp_nodelay
2021/08/03 09:55:07 [debug] 3406#3406: *7 reusable connection: 0
2021/08/03 09:55:07 [debug] 3406#3406: *7 SSL server name: "dsmadeveloperportal.mydomain.com"
2021/08/03 09:55:07 [debug] 3406#3406: *7 SSL ALPN supported by client: h2
2021/08/03 09:55:07 [debug] 3406#3406: *7 SSL ALPN supported by client: http/1.1
2021/08/03 09:55:07 [debug] 3406#3406: *7 SSL ALPN selected: http/1.1
2021/08/03 09:55:07 [debug] 3406#3406: *7 SSL certificate status callback
2021/08/03 09:55:07 [debug] 3406#3406: *7 SSL_do_handshake: -1
2021/08/03 09:55:07 [debug] 3406#3406: *7 SSL_get_error: 2
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL handshake handler: 0
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL_do_handshake: 1
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL: TLSv1.3, cipher: "TLS_AES_256_GCM_SHA384 TLSv1.3 Kx=any Au=any Enc=AESGCM(256) Mac=AEAD"
2021/08/03 09:55:07 [debug] 3405#3405: *6 reusable connection: 1
2021/08/03 09:55:07 [debug] 3405#3405: *6 http wait request handler
2021/08/03 09:55:07 [debug] 3405#3405: *6 malloc: 0000564F51CDA060:1024
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL_read: -1
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL_get_error: 2
2021/08/03 09:55:07 [debug] 3405#3405: *6 free: 0000564F51CDA060
2021/08/03 09:55:07 [debug] 3405#3405: *6 http wait request handler
2021/08/03 09:55:07 [debug] 3405#3405: *6 malloc: 0000564F51CDA060:1024
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL_read: 1024
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL_read: avail:0
2021/08/03 09:55:07 [debug] 3405#3405: *6 reusable connection: 0
2021/08/03 09:55:07 [debug] 3405#3405: *6 posix_memalign: 0000564F51CD8D70:4096 @16
2021/08/03 09:55:07 [debug] 3405#3405: *6 http process request line
2021/08/03 09:55:07 [debug] 3405#3405: *6 http request line: "GET /sites/default/files/2021-08/Account%20and%20Transaction%20API%20Specification_2_1.yml HTTP/1.1"
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'2F:/'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:1 in:'73:s'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'69:i'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'74:t'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'65:e'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'73:s'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'2F:/'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:1 in:'64:d'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'65:e'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'66:f'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'61:a'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'75:u'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'6C:l'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'74:t'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'2F:/'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:1 in:'66:f'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'69:i'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'6C:l'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'65:e'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'73:s'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'2F:/'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:1 in:'32:2'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'30:0'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'32:2'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'31:1'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'2D:-'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'30:0'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'38:8'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'2F:/'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:1 in:'41:A'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'63:c'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'63:c'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'6F:o'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'75:u'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'6E:n'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'74:t'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'25:%'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:4 in:'32:2'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:5 in:'30:0'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'20: '
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'61:a'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'6E:n'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'64:d'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'25:%'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:4 in:'32:2'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:5 in:'30:0'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'20: '
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'54:T'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'72:r'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'61:a'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'6E:n'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'73:s'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'61:a'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'63:c'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'74:t'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'69:i'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'6F:o'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'6E:n'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'25:%'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:4 in:'32:2'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:5 in:'30:0'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'20: '
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'41:A'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'50:P'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'49:I'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'25:%'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:4 in:'32:2'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:5 in:'30:0'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'20: '
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'53:S'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'70:p'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'65:e'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'63:c'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'69:i'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'66:f'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'69:i'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'63:c'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'61:a'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'74:t'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'69:i'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'6F:o'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'6E:n'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'5F:_'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'32:2'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'5F:_'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'31:1'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'2E:.'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'79:y'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'6D:m'
2021/08/03 09:55:07 [debug] 3405#3405: *6 s:0 in:'6C:l'
2021/08/03 09:55:07 [debug] 3405#3405: *6 http uri: "/sites/default/files/2021-08/Account and Transaction API Specification_2_1.yml"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http args: ""
2021/08/03 09:55:07 [debug] 3405#3405: *6 http exten: "yml"
2021/08/03 09:55:07 [debug] 3405#3405: *6 posix_memalign: 0000564F51CCD660:4096 @16
2021/08/03 09:55:07 [debug] 3405#3405: *6 http process request header line
2021/08/03 09:55:07 [debug] 3405#3405: *6 http header: "Host: dsmadeveloperportal.mydomain.com"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http header: "Connection: keep-alive"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http header: "sec-ch-ua: "Chromium";v="92", " Not A;Brand";v="99", "Google Chrome";v="92""
2021/08/03 09:55:07 [debug] 3405#3405: *6 http header: "sec-ch-ua-mobile: ?0"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http header: "Upgrade-Insecure-Requests: 1"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http header: "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http header: "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http header: "Sec-Fetch-Site: none"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http header: "Sec-Fetch-Mode: navigate"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http header: "Sec-Fetch-User: ?1"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http header: "Sec-Fetch-Dest: document"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http header: "Accept-Encoding: gzip, deflate, br"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http header: "Accept-Language: en-GB,en-US;q=0.9,en;q=0.8"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http alloc large header buffer
2021/08/03 09:55:07 [debug] 3405#3405: *6 posix_memalign: 0000564F51CDA470:512 @16
2021/08/03 09:55:07 [debug] 3405#3405: *6 malloc: 0000564F51D9CC40:8192
2021/08/03 09:55:07 [debug] 3405#3405: *6 http large header alloc: 0000564F51D9CC40 8192
2021/08/03 09:55:07 [debug] 3405#3405: *6 http large header copy: 269
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL_read: 417
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL_read: -1
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL_get_error: 2
2021/08/03 09:55:07 [debug] 3405#3405: *6 http header: "Cookie: experimentation_subject_id=eyJfcmFpbHMiOnsibWVzc2FnZSI6IklqWXdOemt6TWpRNUxUQTRNakF0TkRObU55MDRaVGxqTFRJMFpqY3hPV1V3TXpJNE1pST0iLCJleHAiOm51bGwsInB1ciI6ImNvb2tpZS5leHBlcmltZW50YXRpb25fc3ViamVjdF9pZCJ9fQ%3D%3D--3d42b9c34822d75f78ddb657a93af64e73760eb9; AMCVS_2AB511DA57FB93B60A495C21%40AdobeOrg=1; AMCV_2AB511DA57FB93B60A495C21%40AdobeOrg=2096510701%7CMCIDTS%7C18843%7CMCMID%7C13117440465946190474636317212457833781%7CMCAID%7CNONE%7CMCOPTOUT-1627965451s%7CNONE%7CvVersion%7C2.0.0; utag_main=v_id:017b09df8ec90003eb1c1c75d7e90107900370710093c$_sn:1$_se:4$_ss:0$_st:1627980352491$ses_id:1627977923627%3Bexp-session$_pn:4%3Bexp-session$vapi_domain:mydomain.com"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http header: "sec-gpc: 1"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http header done
2021/08/03 09:55:07 [debug] 3405#3405: *6 event timer del: 15: 67098843
2021/08/03 09:55:07 [debug] 3405#3405: *6 generic phase: 0
2021/08/03 09:55:07 [debug] 3405#3405: *6 rewrite phase: 1
2021/08/03 09:55:07 [debug] 3405#3405: *6 test location: "/"
2021/08/03 09:55:07 [debug] 3405#3405: *6 test location: "favicon.ico"
2021/08/03 09:55:07 [debug] 3405#3405: *6 test location: "robots.txt"
2021/08/03 09:55:07 [debug] 3405#3405: *6 test location: ~ "\..*/.*\.php$"
2021/08/03 09:55:07 [debug] 3405#3405: *6 test location: ~ "^/sites/[^/]+/files/.*\.php$"
2021/08/03 09:55:07 [debug] 3405#3405: *6 test location: ~ "^/.well-known/"
2021/08/03 09:55:07 [debug] 3405#3405: *6 test location: ~ "(^|/)\."
2021/08/03 09:55:07 [debug] 3405#3405: *6 test location: ~ "/vendor/.*\.php$"
2021/08/03 09:55:07 [debug] 3405#3405: *6 test location: ~ "\.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock)|web\.config)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$"
2021/08/03 09:55:07 [debug] 3405#3405: *6 using configuration "\.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock)|web\.config)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http cl:-1 max:1048576
2021/08/03 09:55:07 [debug] 3405#3405: *6 rewrite phase: 3
2021/08/03 09:55:07 [debug] 3405#3405: *6 http finalize request: 404, "/sites/default/files/2021-08/Account and Transaction API Specification_2_1.yml?" a:1, c:1
2021/08/03 09:55:07 [debug] 3405#3405: *6 http special response: 404, "/sites/default/files/2021-08/Account and Transaction API Specification_2_1.yml?"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http set discard body
2021/08/03 09:55:07 [debug] 3405#3405: *6 HTTP/1.1 404 Not Found
Server: nginx/1.20.1
Date: Tue, 03 Aug 2021 09:55:07 GMT
Content-Type: text/html
Content-Length: 555
Connection: keep-alive

2021/08/03 09:55:07 [debug] 3405#3405: *6 write new buf t:1 f:0 0000564F51CCDB88, pos 0000564F51CCDB88, size: 155 file: 0, size: 0
2021/08/03 09:55:07 [debug] 3405#3405: *6 http write filter: l:0 f:0 s:155
2021/08/03 09:55:07 [debug] 3405#3405: *6 http output filter "/sites/default/files/2021-08/Account and Transaction API Specification_2_1.yml?"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http copy filter: "/sites/default/files/2021-08/Account and Transaction API Specification_2_1.yml?"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http postpone filter "/sites/default/files/2021-08/Account and Transaction API Specification_2_1.yml?" 0000564F51CD9D60
2021/08/03 09:55:07 [debug] 3405#3405: *6 write old buf t:1 f:0 0000564F51CCDB88, pos 0000564F51CCDB88, size: 155 file: 0, size: 0
2021/08/03 09:55:07 [debug] 3405#3405: *6 write new buf t:0 f:0 0000000000000000, pos 0000564F4FF066C0, size: 100 file: 0, size: 0
2021/08/03 09:55:07 [debug] 3405#3405: *6 write new buf t:0 f:0 0000000000000000, pos 0000564F4FF06E20, size: 53 file: 0, size: 0
2021/08/03 09:55:07 [debug] 3405#3405: *6 write new buf t:0 f:0 0000000000000000, pos 0000564F4FF06C00, size: 402 file: 0, size: 0
2021/08/03 09:55:07 [debug] 3405#3405: *6 http write filter: l:1 f:0 s:710
2021/08/03 09:55:07 [debug] 3405#3405: *6 http write filter limit 0
2021/08/03 09:55:07 [debug] 3405#3405: *6 malloc: 0000564F51D98AF0:16384
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL buf copy: 155
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL buf copy: 100
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL buf copy: 53
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL buf copy: 402
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL to write: 710
2021/08/03 09:55:07 [debug] 3405#3405: *6 SSL_write: 710
2021/08/03 09:55:07 [debug] 3405#3405: *6 http write filter 0000000000000000
2021/08/03 09:55:07 [debug] 3405#3405: *6 http copy filter: 0 "/sites/default/files/2021-08/Account and Transaction API Specification_2_1.yml?"
2021/08/03 09:55:07 [debug] 3405#3405: *6 http finalize request: 0, "/sites/default/files/2021-08/Account and Transaction API Specification_2_1.yml?" a:1, c:1
2021/08/03 09:55:07 [debug] 3405#3405: *6 set http keepalive handler
2021/08/03 09:55:07 [debug] 3405#3405: *6 http close request
2021/08/03 09:55:07 [debug] 3405#3405: *6 http log handler

==> /var/log/nginx/dsmadeveloperportal-access.log <==
14.98.153.6 - - [03/Aug/2021:09:55:07 +0000] "GET /sites/default/files/2021-08/Account%20and%20Transaction%20API%20Specification_2_1.yml HTTP/1.1" 404 555 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36"

==> /var/log/nginx/dsmadeveloperportal-error.log <==
2021/08/03 09:55:07 [debug] 3405#3405: *6 free: 0000564F51CD8D70, unused: 0
2021/08/03 09:55:07 [debug] 3405#3405: *6 free: 0000564F51CCD660, unused: 1827
2021/08/03 09:55:07 [debug] 3405#3405: *6 free: 0000564F51CDA060
2021/08/03 09:55:07 [debug] 3405#3405: *6 hc free: 0000000000000000
2021/08/03 09:55:07 [debug] 3405#3405: *6 hc busy: 0000564F51CDA4F0 1
2021/08/03 09:55:07 [debug] 3405#3405: *6 free: 0000564F51D9CC40
2021/08/03 09:55:07 [debug] 3405#3405: *6 free: 0000564F51D98AF0
2021/08/03 09:55:07 [debug] 3405#3405: *6 reusable connection: 1
2021/08/03 09:55:07 [debug] 3405#3405: *6 event timer add: 15: 65000:67103897
2021/08/03 09:55:07 [debug] 3406#3406: *7 SSL handshake handler: 0
2021/08/03 09:55:07 [debug] 3406#3406: *7 SSL_do_handshake: 1
2021/08/03 09:55:07 [debug] 3406#3406: *7 SSL: TLSv1.3, cipher: "TLS_AES_256_GCM_SHA384 TLSv1.3 Kx=any Au=any Enc=AESGCM(256) Mac=AEAD"
2021/08/03 09:55:07 [debug] 3406#3406: *7 reusable connection: 1
2021/08/03 09:55:07 [debug] 3406#3406: *7 http wait request handler
2021/08/03 09:55:07 [debug] 3406#3406: *7 malloc: 0000564F51D2AD10:1024
2021/08/03 09:55:07 [debug] 3406#3406: *7 SSL_read: -1
2021/08/03 09:55:07 [debug] 3406#3406: *7 SSL_get_error: 2
2021/08/03 09:55:07 [debug] 3406#3406: *7 free: 0000564F51D2AD10
2021/08/03 09:56:07 [debug] 3406#3406: *7 event timer del: 11: 67098847
2021/08/03 09:56:07 [debug] 3406#3406: *7 http wait request handler
2021/08/03 09:56:07 [info] 3406#3406: *7 client timed out (110: Connection timed out) while waiting for request, client: 14.98.153.6, server: 0.0.0.0:443
2021/08/03 09:56:07 [debug] 3406#3406: *7 close http connection: 11
2021/08/03 09:56:07 [debug] 3406#3406: *7 SSL_shutdown: 1
2021/08/03 09:56:07 [debug] 3406#3406: *7 reusable connection: 0
2021/08/03 09:56:07 [debug] 3406#3406: *7 free: 0000000000000000
2021/08/03 09:56:07 [debug] 3406#3406: *7 free: 0000564F51D20F70, unused: 0
2021/08/03 09:56:12 [debug] 3405#3405: *6 event timer del: 15: 67103897
2021/08/03 09:56:12 [debug] 3405#3405: *6 http keepalive handler
2021/08/03 09:56:12 [debug] 3405#3405: *6 close http connection: 15
2021/08/03 09:56:12 [debug] 3405#3405: *6 SSL_shutdown: 1
2021/08/03 09:56:12 [debug] 3405#3405: *6 reusable connection: 0
2021/08/03 09:56:12 [debug] 3405#3405: *6 free: 0000000000000000
2021/08/03 09:56:12 [debug] 3405#3405: *6 free: 0000000000000000
2021/08/03 09:56:12 [debug] 3405#3405: *6 free: 0000000000000000
2021/08/03 09:56:12 [debug] 3405#3405: *6 free: 0000564F51CCF980, unused: 0
2021/08/03 09:56:12 [debug] 3405#3405: *6 free: 0000564F51CDA470, unused: 272
-------------- next part --------------
cat /etc/nginx/conf.d/dsmadeveloperportal.conf
server {
      listen       80 default_server;
      server_name  dsmadeveloperportal.mydomain.com;
      return 301 https://$server_name$request_uri;


}

server {
        listen 443 ssl;
        server_name dsmadeveloperportal.mydomain.com;
        ssl_protocols          TLSv1.3 TLSv1.2;
        ssl_stapling on;
        ssl_stapling_verify on;
        ssl_certificate /etc/ssl/certs/dsmadeveloperportal.mydomain.com/fullchain1.pem;
        ssl_certificate_key /etc/ssl/certs/dsmadeveloperportal.mydomain.com/privkey1.pem;
        access_log /var/log/nginx/dsmadeveloperportal-access.log;
        error_log /var/log/nginx/dsmadeveloperportal-error.log debug;
        ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
	root /var/www/html/dsmadeveloperportal/web;
        ssl_prefer_server_ciphers on;
        ssl_dhparam /etc/ssl/certs/dsmadeveloperportal.mydomain.com/dhparam.pem;
        add_header Strict-Transport-Security: max-age=63072000;
        proxy_busy_buffers_size   512k;
        proxy_buffers   4 512k;
        proxy_buffer_size   256k;
        index index.php index.html index.htm;


location = /favicon.ico {
        log_not_found off;
        access_log off;
    }

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    location ~ \..*/.*\.php$ {
        return 403;
    }

    #location ~ ^/sites/.*/private/ {
    #    return 403;
    #}

    # Block access to scripts in site files directory
    location ~ ^/sites/[^/]+/files/.*\.php$ {
        deny all;
    }

    # Allow "Well-Known URIs" as per RFC 5785
    location ~* ^/.well-known/ {
        allow all;
    }

    # Block access to "hidden" files and directories whose names begin with a
    # period. This includes directories used by version control systems such
    # as Subversion or Git to store control files.
    location ~ (^|/)\. {
        return 403;
    }


    location / {
        # try_files $uri @rewrite; # For Drupal <= 6
      try_files $uri /index.php?$query_string; # For Drupal >= 7
    }

    location @rewrite {
       rewrite ^/(.*)$ /index.php?q=$1;
    }

    # Don't allow direct access to PHP files in the vendor directory.
    location ~ /vendor/.*\.php$ {
        deny all;
        return 404;
    }

    # Protect files and directories from prying eyes.
    location ~* \.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock)|web\.config)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$ {
        deny all;
        return 404;
    }

        location ~ \.php$ {
        include fastcgi.conf;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_read_timeout 300s;
        fastcgi_buffers 16 16k;
        fastcgi_buffer_size 32k;
        }

       location ^~ /core/install.php {
        deny all;
    }
}


More information about the nginx mailing list