Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.8k views
in Technique[技术] by (71.8m points)

php - How to run Websockets on XAMPP and LAMP stack

I have a next stack: Windows, XAMPP v.3.2.2, Laravel 6. I'm using this package to crate a live chat https://github.com/beyondcode/laravel-websockets . It works well if I run the web server using php artisan serve (so it runs the website at localhost:8000) command. But my production server uses Apache, and I'm worrying about how to achieve a success connection to websockets while using only Apache server, because I can't get it on local machine when use Apache. Is says "WebSocket connection to 'wss://site.dev/app/site?protocol=7&client=js&version=4.3.1&flash=false' failed: WebSocket is closed before the connection is established.".

Again, I got it working by php artisan serve, but it works on a built in php server. What is a "true" way of running websockets with Apache? (and locally, with XAMPP)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...