I'm having a weird issue when if I set a cookie in .htaccess, e.g.
and request a .php page I will get a 503 error.
To debug the issue, the .htaccess file contains only the above line and 'RewriteEngine On' (also tried without that and lots of variations, restarting lsws after each change).
The php page contains only the text 'Loaded', no PHP code.
Have tried with both lsphp74 and lsphp82.
Without the RewriteRule setting the cookie, the page will load no problem.
Loading a .txt file rather than .php there are no problems.
In the stderr log I see the following:
Setting debug to the max on the logs, I can see the rewrite rules do process okay, but then the PHP connection fails several times before LiteSpeed gives up and sends a 503:
I'm running OpenLiteSpeed 1.7.17. Our actual server runs the non-open LiteSpeed and the same .htaccess rules to set cookies work fine there.
Anyone have any ideas what the problem might be or steps to debug further?
Code:
RewriteRule .* - [CO=hi:bye]
To debug the issue, the .htaccess file contains only the above line and 'RewriteEngine On' (also tried without that and lots of variations, restarting lsws after each change).
The php page contains only the text 'Loaded', no PHP code.
Have tried with both lsphp74 and lsphp82.
Without the RewriteRule setting the cookie, the page will load no problem.
Loading a .txt file rather than .php there are no problems.
In the stderr log I see the following:
Code:
2023-07-12 07:00:29.798 [STDERR] [UID:65534][1239] Bad request header - ERROR#2
[UID:65534][1239] ParseRequest error
2023-07-12 07:00:29.798 [STDERR] [UID:65534][1240] Bad request header - ERROR#2
[UID:65534][1240] ParseRequest error
2023-07-12 07:00:29.799 [STDERR] [UID:65534][1241] Bad request header - ERROR#2
2023-07-12 07:00:29.799 [STDERR] [UID:65534][1241] ParseRequest error
Code:
2023-07-12 18:58:37.803611 [DEBUG] [3745] [192.168.2.101:54423:HTTP2-1#domain.com:lsapi] Connection to [uds://tmp/lshttpd/domain.comphp82.sock] on request #0, confirmed 0, error: Connection reset by peer!
Anyone have any ideas what the problem might be or steps to debug further?