我已经配置了一个 Apache 反向代理来连接到我的 Synology Nas,但它不起作用。并非所有查询都正确重写为新 URL。
这是我的代码:
<VirtualHost *:80>
ServerAdmin email@loclahost
ServerName server.fritz.box
ProxyHTMLEnable On
ProxyPass /external/ http://192.168.178.99:5000/
ProxyPassReverse /external/ http://192.168.178.99:5000/
</VirtualHost>
只有页面名称和徽标出现在浏览器中,而不是网站。
问题是代理不重写脚本:
<div id="sds-login-dialog-form" style="position: absolute; top: -10000px; left: -10000px;"><form id="login-form" class="x-plain-body" method="POST" action="login.cgi" target="login_iframe" onsubmit="return true;"><input type="text" id="login_username" name="username" maxlength="256" /><input type="password" id="login_passwd" name="passwd" maxlength="256" autocomplete="off" /><input type="text" id="login_otp" name="OTPcode" maxlength="8" autocomplete="off" /><input type="submit" id="login_submit" style="position: absolute; top: -10000px; left: -10000px;" tabindex="-1" /></form><iframe id="login_iframe" name="login_iframe" width="0" height="0" frameborder="0" style="display: none;"></iframe></div>
<div id="sds-apply-preview-form" style="position: absolute; top: -10000px; left: -10000px;"><form id="preview-form" class="x-plain-body" method="POST" action="modules/ControlPanel/modules/dsm.cgi" target="preview_iframe" onsubmit="return true;"><input type="submit" id="preview_submit" style="position: absolute; top: -10000px; left: -10000px;" tabindex="-1" /></form><iframe id="preview_iframe" name="preview_iframe" width="0" height="0" frameborder="0" style="display: none;"></iframe></div>
<script type="text/javascript" src="synodefs.cgi?v=1420615814"></script>
<script type="text/javascript" src="/scripts/uistrings.cgi?lang=ger&v=1427210921"></script>
<script type="text/javascript" src="/webfm/webUI/uistrings.cgi?lang=ger&v=1427210921"></script>
<script type="text/javascript" src="uistrings.cgi?lang=ger&v=1427210921"></script>
<script type="text/javascript" src="/scripts/prototype-1.6.1/prototype.js?v=1420615788"></script>
<script type="text/javascript" src="/scripts/ext-3/adapter/ext/ext-base.js?v=1420615788"></script>
<script type="text/javascript" src="/scripts/ext-3/ext-all.js?v=1420615788"></script>
<script type="text/javascript" src="/scripts/ext-3/ux/ux-all.js?v=1420615788"></script>
<script type="text/javascript" src="/scripts/scrollbar/flexcroll.js?v=1420615788"></script>
<script type="text/javascript" src="sds.js?v=1420615813"></script>
只有在链接开头没有 / 的 Scrips 是可调用的。
如何将它们重写为新 URL?我希望你能帮帮我!
对不起,我的英语不好 :)
最好的祝福西蒙