<div dir="ltr">Hello,<div><br></div><div>Assuming your VPN subnet is <a href="http://10.10.1.0/24">10.10.1.0/24</a>, In your server{} block on <a href="http://erp.mywebpage.com.my">erp.mywebpage.com.my</a> you will want to put the following.</div>
<div><br></div><div>allow <a href="http://10.10.1.0/24">10.10.1.0/24</a>;</div><div>deny all;</div><div><br></div><div>error_page 403 = @403;</div><div>location @403 {</div><div> echo "You are not authorized to view this page"</div>
<div>}</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 6, 2014 at 6:07 PM, ericmachine <span dir="ltr"><<a href="mailto:nginx-forum@nginx.us" target="_blank">nginx-forum@nginx.us</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everyone,<br>
<br>
I would like to check whether this is possible with nginx (on ubuntu 12.04<br>
LTS 64 bits).<br>
<br>
I have a website<br>
<br>
<a href="http://www.mywebpage.com.my" target="_blank">www.mywebpage.com.my</a><br>
<br>
this is just another website.<br>
<br>
There is a login button. When someone click on this login button, it would<br>
redirect them to <a href="https://erp.mywebpage.com.my" target="_blank">https://erp.mywebpage.com.my</a>. However, there are 2<br>
scenarios will happen:-<br>
- if you are connected to our secure VPN (via OpenVPN), this redirection<br>
would be successful.<br>
- if you are not connected to the secure VPN (means the user doesn't have<br>
any access), then it will show "you are not authorised to view this page".<br>
This message should appear within <a href="http://www.mywebpage.com.my" target="_blank">www.mywebpage.com.my</a>.<br>
<br>
FYI<br>
<br>
<a href="http://www.mywebpage.com.my" target="_blank">www.mywebpage.com.my</a> - hosted on a public facing VPS (outside office)<br>
<br>
<a href="http://erp.mywebpage.com.my" target="_blank">erp.mywebpage.com.my</a> - hosted at my office server (once connected to the<br>
secure VPN, it is as if accessing via intranet)<br>
<br>
Is this possible and any suggestions to make this work?<br>
<br>
Thanks.<br>
<br>
Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?2,250715,250715#msg-250715" target="_blank">http://forum.nginx.org/read.php?2,250715,250715#msg-250715</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br></div>