https://customportswears.com/ibc52/cust ... -gear.html
Загружает штраф в браузере, но при проверке с помощью Developer Tools или внешних услуг HTTT-Header IS 404. />Stack:
- CentOS (aaPanel)
- Nginx 1.24.0
- PHP 8.3 (via PHP-FPM)
- CodeIgniter 4
error_page 403 500 502 503 504 /index.php;
error_page 404 /404.php;
location = /404.php {
internal;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index 404.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location / {
try_files $uri $uri/ /index.php$is_args$args;
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
add_header Access-Control-Allow-Headers "Content-Type, Authorization";
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
} ```
What's Happening:
- The actual rendered page appears correct.
- However, HTTP response header for that URL is returning a 404 status.
- Suspect CodeIgniter or nginx config may be causing this, possibly due to try_files, error_page logic, or internal redirect conflicts.
Tried:
- Confirmed that the controller and route in CI4 return content properly.
- Double-checked the file path and route configs.
- Response status mismatch suggests a misconfiguration or forced status return.
Looking for insights from anyone who's handled similar 404 header issues with CodeIgniter and nginx under aaPanel. Could it be a CI4 header override after routing logic? Or does nginx misinterpret the fallback URL?
Any help is appreciated!
Подробнее здесь: https://stackoverflow.com/questions/796 ... nel-codeig