擅长:python、mysql、java
<p>在我们的服务器中,我们运行Apache作为代理服务器,这里是一个示例,希望它能对您有所帮助。在</p>
<pre><code><IfModule mod_proxy.c>
ProxyRequests On
ProxyVia On
<Proxy http://localhost:8080/service>
AddDefaultCharset off
Order allow,deny
Allow from all
</Proxy>
<Proxy http://localhost:8080/foo>
AddDefaultCharset off
Order allow,deny
Allow from all
</Proxy>
<Location "/service">
Order deny,allow
Deny from all
ProxyPass http://localhost:8080/service
ProxyPassReverse http://localhost:8080/service
</Location>
<Location "/foo">
Order deny,allow
Deny from all
ProxyPass http://localhost:8080/foo
ProxyPassReverse http://localhost:8080/foo
</Location>
</IfModule>
</code></pre>