Looking for Alternative to Proxy pass or a websocket solution

#1
What is the alternative of the following apache configuration in OLS

ProxyPass "unix:/var/lib/myapp-web.sock|uwsgi://localhost/myapp/"

I tried the websocket method , it only rerun 404

websocket /myapp/ {
allowBrowse 1
address unix://var/lib/myapp-web.sock
}


There is nothing on the debug log and I was unable to find a suitable documentation
 
#2
OK, Again , I found a solution use a websocket proxy So that I can use the same proxy in all vhosts . The socket /var/lib/myapp-web.sock was a django uwsgi socket connection, A Mailman 3 web interface runing on server side. The mailman 3 service is runing as different user and group and I need to access this application on all virual hosts via an alias .

The uwsgi was configured as "socket" instead of "http-socket", so I fixed it initially .
The OLS send http protocol over uwsgi socket instead of the socket protocol . So that was resulted in the 404 due the the reason mentioned on here
So if your are running any socket application , please make sure to run it as http-socket

1) Create a websocket proxy for the app in the main httpd_conf

extprocessor MySocketAPP {
type proxy
address unix:/var/lib/myapp-web.sock
maxConns 100
initTimeout 5
retryTimeout 5
respBuffer 0
extUser socketowner
extGroup socketgroupuser
# So that the requests will always send the same user/group to the socke while your virtual hosts are under different suexec users
}



2) Create a context inside your vhost as follows,

context /myapp/ {
type proxy
handler MySocketAPP
addDefaultCharset off
}

Now reload the ols server and check your website https://foo.com/myapp/

This issue has been fixed
 
Top