Apache的mod_proxy_wstunnel和mod_proxy已打开
请问
ProxyPass和ProxyPassReverse该怎么配置
还有其他需要设置的吗?
(用的是ubuntu 14.04 lamp-server)
提供websocket服务的文件 /www/Websockets/testwebsock.php
访问的文件 /www/Websockets/client.html
client.html里面的链接:
ws://localhost:8080/Websockets/testwebsock.php
apache配置:
<VirtualHost *:8080>
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyRequests On
#ProxyPreserveHost On
<Location "/Websockets/">
#ProxyPass "/Websockets/client.html" "!"
ProxyPass "ws://127.0.0.1:8080/Websockets/testwebsock.php"
ProxyPassReverse "ws://127.0.0.1:8080/Websockets/testwebsock.php"
</Location>
ErrorLog "/var/log/apache2/ajenti.log"
CustomLog "/var/log/apache2/ajenti-access.log" common
</VirtualHost>
请问那些地方弄错了?
http://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html
ProxyPass "/ws2/" "ws://echo.websocket.org/"
ProxyPass "/wss2/" "wss://echo.websocket.org/"
######/etc/apache2/sites-available/000-default.conf 请问是放在这个里面吗?###### RewriteEngine On
RewriteCond %{REQUEST_URI} ^/socket.io [NC]
RewriteCond %{QUERY_STRING} transport=websocket [NC]
RewriteRule /(.*) ws://localhost:8080/socket.io/$1 [P,L]
######不太懂这个能解释下吗?
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。