I have Cyberpanel + Openlitespeed/Litespeed,
How to make these following lines work with Openlitespeed/Litespeed ? (Not Nginx / Apache)
I am about to deploy, waiting for this please
# Main server block.
server {
# Set default backend.
set $backend "WordPress";
# 1. Use WordPress for all the URLs that start with `/wp-`.
location /wp- {
try_files $uri $uri/ /index.php$is_args$args;
}
# 2. Use WordPress for all the TXT and XML files.
location ~ \.(txt|xml|xsl)$ {
try_files $uri $uri/ /index.php$is_args$args;
}
# 3. Use Frontity for all the URLs that start with `/static`.
location /static {
set $backend "Frontity";
proxy_pass http://localhost:3000;
}
# 4. The rest of the URLs.
location / {
# 4.1 Use Frontity if there is no WordPress auth cookie.
if ($http_cookie !~* "wordpress_logged_in") {
set $backend "Frontity";
proxy_pass http://localhost:3000;
}
# 4.2 Use WordPress with Embedded mode if there is an auth cookie.
try_files $uri $uri/ /index.php$is_args$args;
}
add_header "X-Backend" $backend; }`