So, i have a server running Nginx Proxymanager that handles all incomming http/https requests and SSL termination towards a Cyberpanel server running Openlitespeed. As i recently updated Cyberpanel, a update for Openlitespeed happened aswell.
After this update all my websites in Cyberpanel logs an error of 400
Like this: 2023-08-18 13:53:20.562546 [INFO] [21429] [192.168.9.131:36602] Status 400: Invalid charactor in header name: 'X-ForProto -Proto'
As i understand it, it’s mostly related to my Nginx proxy manager config of proxy_set_header X-Forwarded-Proto $scheme; as this is the only thing i can find related to “Proto”.
Could anyone please explain a solution to this problem as im shot blank and not used to these kinds of issues (Simple homelab owner)
It seams i can’t edit the config from within the Nginx proxymanager UI it self and have to do a rebuild? (Maybe) Im not a solid Docker user either so some basic instructions and maybe an explanation wold do me good at this point. Maybe i need to understand the problem deeper in order to solve it?
Thanks in advance!
I have been trying to reconfigure and uncommenting proxy_set_header X-Forwarder-Proto $scheme; with no luck, either i end up with 503 or a blank page. Cache have been cleared and both server have been restarted.
I have also created a tread over at Cyberpanel forums with no luck since yesterday.
The error message Invalid charactor in header name: 'X-ForProto -Proto' indicates that there’s an issue with the header X-ForProto -Proto being sent to OpenLiteSpeed. This header is likely being generated by Nginx Proxy Manager due to the proxy_set_header X-Forwarded-Proto $scheme; directive.
Possible Solutions:
Remove the proxy_set_header X-Forwarded-Proto $scheme; Directive:
Open the Nginx Proxy Manager configuration file (usually located in /etc/nginx-proxy-manager/nginx-proxy.conf ).
Comment out or remove the proxy_set_header X-Forwarded-Proto $scheme; line.
Save the file and restart Nginx Proxy Manager.
Check for Conflicting Configurations:
Ensure that there are no conflicting configurations in your OpenLiteSpeed or Nginx Proxy Manager settings that might be interfering with the header.
Look for any custom rules or modules that might be modifying headers.
Update Nginx Proxy Manager:
If you haven’t already done so, update Nginx Proxy Manager to the latest version to see if the issue is resolved.
Verify OpenLiteSpeed Configuration:
Check the OpenLiteSpeed configuration to ensure that it’s compatible with the Nginx Proxy Manager settings.
Look for any specific requirements or limitations related to header handling.
Debug with Logs:
Enable detailed logging in both Nginx Proxy Manager and OpenLiteSpeed to gather more information about the request and response.
Look for any error messages or unexpected behavior that might provide clues about the issue.
Additional Tips:
If you’re using a Docker-based Nginx Proxy Manager, consider rebuilding the container to ensure that any changes to the configuration file are applied correctly.
Try temporarily disabling SSL termination in Nginx Proxy Manager to see if the issue persists.
If you’re still unable to resolve the problem, consider reaching out to the Nginx Proxy Manager or OpenLiteSpeed communities for further assistance.
By following these steps and carefully analyzing the logs, you should be able to identify and resolve the cause of the 400 error in your Nginx Proxy Manager configuration.