所以这是我的虚拟主机
NameVirtualHost *:8080
<VirtualHost mysite.org:8080>
ServerAdmin panda@gmail.com
ServerName localhost
ServerAlias www.mysite.org
ProxyRequests off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location />
ProxyPass http://mysite.org:8081/
ProxyPassReverse http://mysite.org:8081/
</Location>
DocumentRoot /Users/panda/Dropbox/www/_playground/node
ErrorLog "logs/dummy-host2.example.com-error_log"
CustomLog "logs/dummy-host2.example.com-access_log" common
</VirtualHost>
现在从我的apache应用程序中,如果我尝试链接这样的脚本文件:<script src="/socket.io/socket.io.js"></script>
无法正常工作,我需要这样做:<script src="http://mysite.org:8081/socket.io/socket.io.js"></script>
我做错了什么?
答案 0 :(得分:0)
尝试使用xhr-polling作为传输,websocket不太可能通过apache代理工作
socketio.set("transports", ["xhr-polling"]);