瀏覽代碼

fix commento websocket proxy

Thomas Buck 2 年之前
父節點
當前提交
b12aa08e13
共有 2 個檔案被更改,包括 6 行新增0 行删除
  1. 4
    0
      roles/blog/tasks/commento.yml
  2. 2
    0
      roles/blog/templates/etc_apache2_sites-available_commento.j2

+ 4
- 0
roles/blog/tasks/commento.yml 查看文件

@@ -72,3 +72,7 @@
72 72
   command: a2ensite commento_{{ item }}.conf creates=/etc/apache2/sites-enabled/commento_{{ item }}.conf
73 73
   notify: restart apache
74 74
   with_items: "{{ virtual_domains | json_query('[*].name') }}"
75
+
76
+- name: Enable Apache wstunnel module
77
+  command: a2enmod proxy_wstunnel creates=/etc/apache2/mods-enabled/proxy_wstunnel.load
78
+  notify: restart apache

+ 2
- 0
roles/blog/templates/etc_apache2_sites-available_commento.j2 查看文件

@@ -18,6 +18,8 @@
18 18
 
19 19
     ProxyRequests           On
20 20
     ProxyPreserveHost       On
21
+    ProxyPass               /ws ws://localhost:{{ commento_internal_port }}/ws
22
+    ProxyPassReverse        /ws ws://localhost:{{ commento_internal_port }}/ws
21 23
     ProxyPass               / http://localhost:{{ commento_internal_port }}/
22 24
     ProxyPassReverse        / http://localhost:{{ commento_internal_port }}/
23 25
 </VirtualHost>

Loading…
取消
儲存