Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.1k 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 Reply

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...