Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: "Request failed with status code 404" #378

Open
aristidesneto opened this issue Jun 3, 2024 · 2 comments
Open

Error: "Request failed with status code 404" #378

aristidesneto opened this issue Jun 3, 2024 · 2 comments

Comments

@aristidesneto
Copy link

Hello,

I installed and configured it locally and everything worked correctly.

When I went up to the development environment, on a web server, I can open the logs page but it shows an error where the list of logs found on the server should be.

When opening the browser console and in the Preview tab, we see that it apparently returned the laravel and nginx log file correctly. But it doesn't show the files in the left corner of the screen.

I'm using Laravel only as an API.

image

Log do Nginx:

2024/06/02 22:32:33 [error] 1661202#1661202: *214529 open() "/var/www/html/example.com/current/public/log-viewer" failed (2: No such file or directory), client: 1..., server: example.com, request: "GET /log-viewer HTTP/2.0", host: "example.com"
2024/06/02 22:32:34 [error] 1661202#1661202: *214529 open() "/var/www/html/example.com/current/public/log-viewer/api/folders" failed (2: No such file or directory), client: 1..., server: example.com, request: "GET /log-viewer/api/folders?direction=desc HTTP/2.0", host: "example.com", referrer: "https://example.com/log-viewer"

APP_ENV is local

Laravel version: 10.10
Log-viewer version: 3.10
PHP: 8.1

I haven't been able to find the reason for the error yet. Has anyone had this problem or could give me some insight?!

Thanks

@arukompas
Copy link
Contributor

Hey @aristidesneto

Could you share the request and response headers as well?

@aristidesneto
Copy link
Author

aristidesneto commented Jun 3, 2024

Hey @aristidesneto

Could you share the request and response headers as well?

Hey @arukompas thanks for answering

Response Headers:
Alt-Svc:					h3=":443"; ma=86400
Cache-Control:					no-cache, private
Cf-Cache-Status:				DYNAMIC

Cf-Ray:						88de6810bf58a176-GRU
Content-Encoding:				gzip
Content-Type:					application/json
Date:						Mon, 03 Jun 2024 08:45:23 GMT
Nel:						{"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Report-To:					{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=%123%2BV8KbFzw%3D%3D"}],"group":"cf-nel","max_age":604800}
Server:						cloudflare
Strict-Transport-Security:		        max-age=0; includeSubDomains
Vary:						Accept-Encoding
X-Content-Type-Options:			        nosniff

Request Headers:
:authority:					example.com
:method:					GET
:path:						/log-viewer/api/folders?direction=desc
:scheme:					https
Accept:						application/json, text/plain, */*
Accept-Encoding:				gzip, deflate, br, zstd
Accept-Language:			        pt-BR,pt;q=0.9,en-US;q=0.8,en;q=0.7
Authorization:					Basic 123==
Cookie:						XSRF-TOKEN=123%3D; example_session=123%3D; 123
Dnt:						1
Priority:					u=1, i
Referer:					https://example.com/log-viewer
Sec-Ch-Ua:					"Google Chrome";v="125", "Chromium";v="125", "Not.A/Brand";v="24"
Sec-Ch-Ua-Mobile:				?0
Sec-Ch-Ua-Platform:				"Linux"
Sec-Fetch-Dest:					empty
Sec-Fetch-Mode:					cors
Sec-Fetch-Site:					same-origin
User-Agent:					Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
X-Csrf-Token:					123
X-Requested-With:				XMLHttpRequest
X-Xsrf-Token:					123=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants