GNU/Linux >> Belajar Linux >  >> Linux

Mengonfigurasi Apache untuk menangani WebSocks

WebSocks didukung oleh Apache mulai dari versi 2.4.xx. Berikut adalah beberapa konfigurasi minimal untuk Apache 2.4.xx. di Ubuntu 14.04.x

Instal modul yang tepat:
a2enmod proxy
a2enmod proxy_wstunnel

Konfigurasikan VirtualHost (hanya bagian WebSock yang ditampilkan di sini)

# Make sure the backend server gets the right URL in 'Location:' http Header
ProxyPreserveHost On
#
# Forward only the websocks requests to the Websocks handler in the backend server
RewriteRule ^/websock/(.*) ws://my.backend.net:8080/websock/$1 [P]
ProxyPassReverse / ws://my.backend.net:8080/
#
# Forward the rest of the requests to the backend server as http requests
ProxyPass / http://my.backend.net:8080/
ProxyPassReverse / http://my.backend.net:8080/


Linux
  1. Mengkonfigurasi Perangkat Alsa Default (hw:0,0) Di Asoundrc?

  2. Alat Gui Untuk Apache?

  3. Mengkonfigurasi Apache 2.4 Dengan Fastcgi Di Ubuntu 16.04 – Apa Yang Saya Lakukan Dengan Php7.0-fpm.conf?

  1. Ubah zona waktu Apache/PHP

  2. Bagaimana cara menginstal Apache di Ubuntu?

  3. Mengonfigurasi Keamanan IP di IIS

  1. Mulai ulang Apache

  2. Thread ID vs Thread Handle

  3. Menjalankan Apache sebagai pengguna yang berbeda