how to set up openlitespeed Proxy

#1
/usr/local/lsws/html/vvv/html [22:27:35]
$ ls vvv
total 96K
drwxr-xr-x 5 nobody nogroup 4.0K Dec 19 21:49 .
drwxr-xr-x 3 nobody nogroup 4.0K Dec 19 21:13 ..
-rw-r--r-- 1 nobody nogroup 11K Jul 24 2019 about.html
-rw-r--r-- 1 nobody nogroup 12K Jul 24 2019 blog.html
-rw-r--r-- 1 nobody nogroup 8.9K Jul 24 2019 contact.html
drwxr-xr-x 2 nobody nogroup 4.0K Aug 5 12:07 css
drwxr-xr-x 2 nobody nogroup 4.0K Aug 6 16:10 images
-rw-r--r-- 1 nobody nogroup 22K Jul 24 2019 index.html
drwxr-xr-x 2 nobody nogroup 4.0K Aug 5 12:05 js
-rw-r--r-- 1 nobody nogroup 14K Jul 25 2019 recipe.html




No matter how you set it up
Both are 500 or 503

Snipaste_2020-12-19_20-43-01.png Snipaste_2020-12-19_20-43-44.png Snipaste_2020-12-19_20-44-15.png Snipaste_2020-12-19_20-44-32.png Snipaste_2020-12-19_20-44-46.png
 
#6
OpenLiteSpeed There are several websites above, all of which are normal, only the agent cannot open
It's been two days,
it's still not good, it's too tired.




Virtual Host Name v2
Virtual Host Root $SERVER_ROOT/html/vvv
Config File $SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf


Document Root $VH_ROOT/html/vvv
 
#7
netstat -pln |grep 12000

sudo ss -tulpn | grep LISTEN

sudo lsof -i -P -n | grep LISTEN

sudo ss -tulpn | grep :12000

All empty, the server is not started
 

gilles

Active Member
#8
Hi @jack lee, I'm sorry you are experiencing so much trouble setting up the reverse proxy.

I am a bit confused by your last post. http://127.0.0.1:12000 should be the address/port of your existing server, which will be behind the OLS proxy. So it has to be running first. The fact that you are putting html files under your $DOC_ROOT does not seem like you want to run this virtual host as a reverse proxy. Could you explain what you are trying to do?
 
#9
please forgive my english is not very good
Forgive me for not being able to explain in english
I using openlitespeed to proxy v2ray

google search for "v2ray nginx proxy" You will understand what i mean
I need a website to proxy V2ray.
The content of the website is not important, PHP, html.Java, not important

Virtual Host Root is $SERVER_ROOT/html/vvv
$DOC_ROOT is $VH_ROOT/html/vvv


但是我无法用英文解释,你可以用谷歌翻译一下中文,看能不能理解
我的意思是说,我需要一个网站来代理v2ray.我在nginx上面是可以做到的,nginx的代码在下面.
,现在我换成了openlitespeed,我无法做到反代
我可能需要先设置一个不用反代的Virtual Host来认证,然后在反代.


Can also Click below
https://github.com/bannedbook/fanqiang/blob/master/v2ss/V2Ray之TLS+WebSocket+Nginx+CDN配置方法.md

Where is this set
nginx

location /Transpo8597389457893475893570/











The following is the configuration of nginx

Code:
server {
    listen 80;
    server_name xxx.com;
    return 301 https://xxx.com$request_uri;
}

server {
    listen 443 ssl;
    server_name xxx.com;


   ssl_certificate /etc/letsencrypt/live/xxx.com/fullchain.pem;
   ssl_certificate_key /etc/letsencrypt/live/xxx.com/privkey.pem;


   include global/letsencrypt.conf;

   ssl_protocols    TLSv1.2 TLSv1.3;
   ssl_ciphers 'TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-256-GCM-SHA384:TLS13-AES-128-GCM-SHA256:EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
   #ssl_early_data on;
   ssl_prefer_server_ciphers off;
   ssl_ecdh_curve secp384r1;
   ssl_session_cache shared:SSL:10m;
   ssl_session_timeout 10m;
   ssl_stapling on;
   ssl_stapling_verify on;
   resolver 8.8.4.4 1.1.1.1 1.0.0.1 8.8.8.8;


    location /Transpo8597389457893475893570/
    {
        proxy_pass http://127.0.0.1:12000;
        proxy_redirect off;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

}
 
Last edited:
#14
Yes, my proxy can be used

But now I have another problem
My website won't open
Most likely PHP is not started




I can't open it according to this tutorial
On OpenLiteSpeed, if you edit php.ini or installed a PHP module, restart OpenLiteSpeed won’t show the changes. You will need to restart PHP process.
You can do this by killing all PHP process with
killall -9 lsphp
Or you can create a file
touch /usr/local/lsws/admin/tmp/.lsphp_restart.txt
If you need PHP restarted just for a web site, run
touch /home/USER1/.lsphp_restart.txt
I can't open it according to this tutorial
https://openlitespeed.org/kb/php-detached-mode/
 

lsqtwrk

Administrator
#17
Hi,


Please check :

1. if you have install lsphp from repo ?

2. did you create external app and script handler ?

3. if you access a static resources, like an image or HTML file , does it open properly ?

4. for the error log you posted in #17 , that's something else, not related to your website , but please also check what is permission and ownership for /usr/local/lsws/conf/vhosts , it should be owned by lsadm:nogroup
 
Top