Page 1 of 1

How to disable users from logging into admin panel

Posted: Thu May 01, 2014 10:58 am
by ironhide
Hi

In my server I am creating new users via API, and sending them ssh details etc by email. The only thing I want is to prevent them from logging into vesta control panel with their credentials. Which means that only admin can log into the admin panel and no one else.

How to do that?

Re: How to disable users from logging into admin panel

Posted: Thu May 01, 2014 8:56 pm
by demlasjr
That's not the purpose of a web hosting control panel.

You can create accounts and stop the email with the credentials from being send to the clients. That's all you can do.

Re: How to disable users from logging into admin panel

Posted: Fri May 02, 2014 7:40 pm
by ironhide
Does it matter if that is a purpose of a web hosting control panel or not? Because it's always how the user's are planning to use it, matters.

There must be a way of doing that. If it's not easily doable via altering some configs, then I will have to change the code to meet my requirement.

Re: How to disable users from logging into admin panel

Posted: Fri May 02, 2014 8:27 pm
by imperio
ironhide,
this is impossible on web-interface

you can use vesta-nginx for this

/usr/local/vesta/nginx/conf
find this lines

Code: Select all

location / {
            expires max;
            index   index.php;
        }
(line 95)

add this code

Code: Select all

			allow your_ip;
			deny all;
final code

Code: Select all

location / {
            expires max;
            index   index.php;
			allow your_ip;
			deny all;
        }

Code: Select all

service vesta restart
after this only you can login in the vestacp