Virtual host with stop icon and no way to start it

olsy

New Member
#1
Hi,

I need some help to get this reverse proxy vhost up and running in front of Elastic Search running in another Docker container.
I'm also using WSL2, but that shouldn't matter much, as I've made similar setup work with other servers.
I have bound the already present HTTP(80) listener to domain elastic.test, and elastic.test vhost, and vhost's Proxy context is targeting the external app which points to http://elasticsearch:9200, which is gettable using wget from docker exect -it ols_container bash.

Also, I'm not seeing any access to elastic.test in server logs, probably because it's permanently stopped.

This is the vhost.conf:

Code:
docRoot                   $VH_ROOT/html
vhDomain                  elastic.test

errorlog  {
  useServer               1
  logLevel                INFO
  rollingSize             100M
  keepDays                7
}

accesslog  {
  useServer               1
}

context / {
  type                    proxy
  handler                 elastic.test
  addDefaultCharset       off
}
...and this is the vhosts screen:
Snimka zaslona 2022-03-17 180323.png
 

olsy

New Member
#3
Thank you very much! The "only" thing missing was the actual vhost directory under /usr/local/lsws, but given that I haven't seen a mention of that in the logs, it wouldn't hurt the web admin was a little more verbose around the vhost instantiation area (or perhaps even create the folders itself).

Would you accept a pull request if I was to add the creation part in the web admin?
 

Cold-Egg

Administrator
#4
A PR is always welcome. but for general virtual host dir, do you mean, e.g. "mkdir /usr/local/lsws/NEWExample/conf"? a PR maybe not be needed since everyone may want to create it in a different location or with a different name. Hence you will need to set proper permission for it. Unless I misunderstood what you want to do?
 

olsy

New Member
#5
I have (if I recall correctly) set the non-existent path inside the "Virtual Host Root" box, but it didn't offer to create the directory like it did for "Config File" (and some other non-existent paths I entered in Web Admin during vhost creation).
 
Top