I want to protect my admin page not only with a login and password, but also with IP filtering as described here: https://security.stackexchange.com/a/30649/68841

But I have two questions:

  1. Can I use a proxy instead of a VPN?
  2. I also need to use one more proxy on the server, for API requests to the specific site which blocked in my country. Can I use the same proxy to access the admin page on my server and for the API requests from this server to another site?

1 Answer 1


Yes, you can use a proxy. Your two questions will answer with one application, you need to set up this. You can use NGINX.

NGINX is opensource software for web serving, reverse proxying, caching, load balancing, media streaming, and more.

Here's my answer to your questions:

  1. Yes you can use nginx proxy to protect your admin panel, Here's the link https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/

  2. You use Nginx proxy again in the same server, what you need to do is setup a virtual host or server Blocks and proxy pass if you want to other api to your domain https://www.nginx.com/resources/wiki/start/topics/examples/server_blocks/

  • Many thanks for your detailed answer! But 1. I don't want to set up my own proxy server from scratch, I just want to buy proxy as a service. 2. I want to do something simpler, as in the link provided in my question: when I want to use admin page, I will enable proxy on my local computer and connect to the my admin page which allow only IP of my proxy server. Is it ok? And do I really need any other additional settings? Commented Nov 10, 2019 at 20:25
  • 3. Can you explain why I need a virtual host? In the described case I need a proxy for API requests from my server to another, not mine, site. So, maybe I can just make API requests to this site via proxy without virtual host and proxy pass settings? Commented Nov 10, 2019 at 20:25
  • Ok, you didn't mention that you want to use proxy as a service, in your number 2 question, It is ok to use the proxy server but you need to whitelist the IP of your proxy server so that the admin page can allow on the whitelisted IP.
    – Al Francis
    Commented Nov 13, 2019 at 2:16
  • No need to use a virtual host, you can use it to access your admin page as well as connecting to another API.
    – Al Francis
    Commented Nov 13, 2019 at 2:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .