I tried setting up my own error page for the HTTP 500 error thrown by PHP. And it didn't work.
Steps on how to check it:
1) Install OLS on Ubuntu 20.04 according to the manual.
2) cp /usr/local/lsws/Example/html/phpinfo.php /usr/local/lsws/Example/html/p.php
3) Edit /usr/local/lsws/Example/html/p.php
\\phpinfo();
phpinfo():
4) cp /usr/local/lsws/Example/html/error404.html /usr/local/lsws/Example/html/error500.html
5) WebAdmin > Virtual Host Example > General > Customized Error Pages add "500 Internal Server Error" -> /error500.html
6) Restart Server
7) run curl -v http://localhost:8088/p.php
* Trying ::1:8088...
* TCP_NODELAY set
* connect to ::1 port 8088 failed: Połączenie odrzucone
* Trying 127.0.0.1:8088...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8088 (#0)
> GET /p.php HTTP/1.1
> Host: localhost:8088
> User-Agent: curl/7.68.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 500 Internal Server Error
< content-type: text/html; charset=UTF-8
< content-length: 0
< date: Sat, 13 Nov 2021 06:08:54 GMT
< server: LiteSpeed
< connection: Keep-Alive
<
* Connection #0 to host localhost left intact
As you can see, it does not load the prepared page with the error.
I tried setting up my own error page for the HTTP 500 error thrown by PHP. And it didn't work.
Steps on how to check it: 1) Install OLS on Ubuntu 20.04 according to the manual. 2)
cp /usr/local/lsws/Example/html/phpinfo.php /usr/local/lsws/Example/html/p.php
3) Edit /usr/local/lsws/Example/html/p.php4)
cp /usr/local/lsws/Example/html/error404.html /usr/local/lsws/Example/html/error500.html
5) WebAdmin > Virtual Host Example > General > Customized Error Pages add "500 Internal Server Error" -> /error500.html 6) Restart Server 7) runcurl -v http://localhost:8088/p.php
As you can see, it does not load the prepared page with the error.