Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法将 URL 代理到 apache 中的另一个端口?例如,我想(反向)代理 URL:
http://*.localhost/engine.io/?EIO=2&transport=polling
从端口 80 到端口 8080 不更改 url:
http://*.localhost:8080/engine.io/?EIO=2&transport=polling
谢谢!
在您的*.localhost(端口 80)虚拟主机中,添加:
*.localhost
RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{HTTP_HOST} ^(.*)$ RewriteRule ^/engine\.io/$ http://%1:8080/engine.io/?%{QUERY_STRING} [L,P]