403 returns, but I'm not sure how it works
Tried
conf file
error_page403/hoge.php;
hoge.php
<?php
http_response_code(403);
Browser Screen
403 Forbiddenginx/1.12.2
Q1. Where is "403 Forbiddenginx/1.12.2" set?
·Are you calling any screen?
·Or just displaying the text dynamically??
"·Is it possible to hide ""nginx"" and ""version"" on this screen?"
n I checked nginx.conf, but there is nothing about 403
Q2. Where is "403 Forbiddenginx/1.12.2" set?
·How can I call this screen directly?
"·Currently, the flow says ""intentionally set page 403"" → ""custom page specified in error_page 403"" → ""403 Forbidden nginx/1.12.2"", but how can I call this ""403 Forbidden"" screen directly from ""403 Set Page"" instead of via custom page?"
Question Background
"·I am not particular about ""403 Forbidden"", so I would like to set it as easily as possible without specifying it for each server."
"·If Nginx itself has the function of displaying ""403 Forbidden"", I would like to use it
"What happens when a 403 error occurs?"
1) An error_page403/hoge.php; (meaning show /hoge.php when 403 errors occur) configuration causes hoge.php to run.
2) In hoge.php, http_response_code(403); displays the HTTP response of 403 ("403Forbiddingginx/1.12.2").
The reason it appears is because the function http_response_code is created like that.
==
"Is it possible to hide nginx and version on this screen?"
Hoge.php determines what you want to see.If you only want to see "403 Forbidden", you can use hoge.php as follows:
{php?
echo('403Forbiden')
618 Uncaught (inpromise) Error on Electron: An object could not be cloned
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
915 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.