Apache Proxy - config issue - no interaction with a chatbot

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Apache Proxy - config issue - no interaction with a chatbot

Postby smalldragoon » 18. April 2020 12:30

Hello, I need to host Botpress through a reverse proxy as my ISP only allow port 443 to be open.
( ISP has a load balancer which redirect any connection from port external 443 to internal 80 )

I have created a virtual host in my apache server, with proxying ( see config below ) which works perfectly for admin.
When I try to interact with the bot, I have nothing displayed on the screen, so I suspect some proxying/redirection issues as I get from the bot logs, that it is working ( and acting according what I type )

Of course, I can connect to the bot directly on port 3005 without apache proxy, the bot works perfectly fine.
Any insight ? tips ?
Thanks

Code: Select all
<VirtualHost *:80>
ProxyPreserveHost On

    ProxyPass / http://127.0.0.1:3005/
    ProxyPassReverse / http://127.0.0.1:3005/
     

        ErrorLog ${APACHE_LOG_DIR}/error-Chatbot.log
        CustomLog ${APACHE_LOG_DIR}/access-Chatbot.log combined
    ServerName MY-Server-Hostname.com
</VirtualHost>
smalldragoon
 
Posts: 18
Joined: 29. May 2019 23:47
XAMPP version: 1.0
Operating System: ubuntu

Re: Apache Proxy - config issue - no interaction with a chat

Postby Nobbie » 18. April 2020 12:58

I dont think this can work, as Apache is running HTTP Protocoll which is transactional (what means, requests and responses are treated as a whole request and the connection is closed after each request/response), whereas a chat is conversational unbuffered I/O. You cannot run chats via HTTP.

Actually i dont know Botpress, but i know that chats do not run via HTTP. Its the wrong protocoll for that kind of conversation.
Last edited by Nobbie on 18. April 2020 13:13, edited 1 time in total.
Nobbie
 
Posts: 11775
Joined: 09. March 2008 13:04

Re: Apache Proxy - config issue - no interaction with a chat

Postby smalldragoon » 18. April 2020 13:13

Hi
Thanks for your answer. ISP is suggestion haproxy ( http://www.haproxy.org/) , but this means that I will have to redirect everything through the apache ( means 3 steps at the end : ISP LB, haproxy and then, my apache :( )
smalldragoon
 
Posts: 18
Joined: 29. May 2019 23:47
XAMPP version: 1.0
Operating System: ubuntu

Re: Apache Proxy - config issue - no interaction with a chat

Postby Nobbie » 18. April 2020 13:13

If have found some articles about Botpress behind Apache reverse Proxy, ony of these https://rocket.chat/docs/installation/m ... rse-proxy/ shows how to redirect to ws: (websocket) instead of http: in case of certain HTTP Update Header. I never have done similar configurations, but i think going for websockets instead of http: might be the right idea, i really dont know. Actually you are in a completely wrong forum, we dont support any 3rd party products, we only support Xampp on linux distributions.
Nobbie
 
Posts: 11775
Joined: 09. March 2008 13:04

Re: Apache Proxy - config issue - no interaction with a chat

Postby smalldragoon » 18. April 2020 21:41

Thanks a lot for the insights.
sorry for the wrong forum. I'm using XAMPP for the sites, and the chatbot is somehting else. will repost in the right forum
smalldragoon
 
Posts: 18
Joined: 29. May 2019 23:47
XAMPP version: 1.0
Operating System: ubuntu


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 3 guests