How to allow specific IP access in Nginx?

How do I allow a mobile IP address in Apache's allow directive?

  • In my development and stage server I only allow some IP address to access the website using the deny all, allow someip directives I my virtual host configuration. When my IP changes I use capistrano to automatically detect my new IP and connect to the server via SSH and change the virtual host to allow my new IP. This is working, but my mobile app needs to reach the web server. Is there any way I could configure the web server to do this?

  • Answer:

    Unfortunately this can't be done for mobile, because the mobile network operator uses only a few IPs as gateways for the entire network. So you can't add an entry for your specific mobile IP only, since it will be a private address.

Miguel Paraz at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.