dsgs8208 2013-02-01 20:52
浏览 57

使用apache在同一端口上的Node.js,代理传递不起作用

So here is my virtual host

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>

Now from my apache app if I try to link a script file like this: <script src="/socket.io/socket.io.js"></script> isn't working I need to do: <script src="http://mysite.org:8081/socket.io/socket.io.js"></script>

I'm doing something wrong?

  • 写回答

1条回答 默认 最新

  • doudiecai1572 2013-02-02 01:42
    关注

    Try using xhr-polling as the transport, websocket is not likely to work through the apache proxy

    socketio.set("transports", ["xhr-polling"]);
    
    评论

报告相同问题?

悬赏问题

  • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号