404 when LSWS is used as reverse proxy

#1
When I tried to load http://127.0.0.1/ I get a 404 error. I've added vhost, listener of the 80 port, and added the vhost to the listener. I also added context and Web server in the `external app` field. Also, I added a rewrite rule. What I did wrong?
Configuration of vhost:
Code:
extprocessor backend {
  type                    proxy
  address                 http://127.0.0.1:8070
  maxConns                2000
  initTimeout             1
  retryTimeout            1
  respBuffer              0
}

context / {
  type                    proxy
  handler                 backend
  addDefaultCharset       off
}

rewrite  {
  enable                  1
  autoLoadHtaccess        0
  logLevel                2
RewriteRule (.*) http://127.0.0.1:8070/$1 [P]
}
 
#3
May I know how did you send request to LSWS by visiting 127.0.0.1? or by domain?
I've tried both 127.0.0.1 and localhost. Same error.
UPD: Now seems I have progress. I used the default example (because this one has root files as it happens in HTML or PHP projects. ). I added a web server with the name 127.0.0.1:8070 and add a rewrite rule:
Apache config:
RewriteRule / http://127.0.0.1:8070/$1 [P]
Now the page is opened buuuuut..... without images, styles, scripts and etc 'cos all files are marked as `text/html; charset=UTF-8`. What has happened with MIME types after rewrite rules?
 
Last edited:
#5
You should verify your backend first to make sure it is working properly. Proxy function only redirect traffic.

By the way, your configuration file looks OLS, not LSWS. you should use https://forum.openlitespeed.org/ if it is the case.
Verify? What do you mean? It works without WEB server and works with nginx.
By the way, your configuration file looks OLS, not LSWS. you should use https://forum.openlitespeed.org/ if it is the case.
I have asked here. Yes, I use OLS. I thought it is also litespeed. So, need I to switch to that forum right now or I can get an answer here?
 
Top