I use Apache server as a proxy for my playframework application. The proxy configuration file is as follows:
> <VirtualHost *:80>
> ProxyPreserveHost Off
> ServerAdmin redhorse@viform.net
> DocumentRoot "/home/admin/www"
> ServerName viform.net
> ErrorLog "logs/viform.net-error.log"
> ProxyPass /zh-cn/ http://localhost:9000/
> ProxyPassReverse /zh-cn/ http://localhost:9000/
> </VirtualHost>
When I go to http://viform.net/zh-cn/signin , it shows me the correct page. But the URLs of static resources on the page are incorrect. The generated html page code is as follows:
...
<script type="text/javascript" src="/public/javascripts/base.js">
</script>
<script type="text/javascript" src="/public/javascripts/secure/submitbutton.js">
</script>
<script type="text/javascript" src="/public/javascripts/secure/signinpanel.js">
</script>
...
The browser cannot find these resources, as their src paths must begin with "/ zh-cn". Can anyone help me figure this out? Thank.
source
share