Page 1 of 1

Apache Proxy - config issue - no interaction with a chatbot

PostPosted: 18. April 2020 12:30
by smalldragoon
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>

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

PostPosted: 18. April 2020 12:58
by Nobbie
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.

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

PostPosted: 18. April 2020 13:13
by smalldragoon
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 :( )

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

PostPosted: 18. April 2020 13:13
by Nobbie
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.

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

PostPosted: 18. April 2020 21:41
by smalldragoon
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