Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Allow Panel access only in one domain

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
6 posts • Page 1 of 1
chiqui
Posts: 2
Joined: Tue Jun 14, 2016 10:06 pm

Allow Panel access only in one domain
  • Quote

Post by chiqui » Tue Jun 14, 2016 10:13 pm

Hi, Im trying to set up vesta to allow panel access only from only one domain, but Im note being able to do so. I've modified the nginx config file /usr/local/vesta/nginx/conf/nginx.conf to

Code: Select all

listen          mypaneldomain.com:8083;
# server_name     _;
server_name     mypaneldomain.com;
but I'm still able to access the login page from other domains... how can I achieve this? Thanks!
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Allow Panel access only in one domain
  • Quote

Post by skurudo » Wed Jun 15, 2016 8:29 am

Did you restart vesta-nginx service after changes?

Code: Select all

service vesta restart
Top

chiqui
Posts: 2
Joined: Tue Jun 14, 2016 10:06 pm

Re: Allow Panel access only in one domain
  • Quote

Post by chiqui » Wed Jun 15, 2016 2:17 pm

Yes, already restarted the service but I can still access the panel from other domains. Any ideas? Thanks!
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Allow Panel access only in one domain
  • Quote

Post by skurudo » Tue Jun 21, 2016 8:36 am

Yep, I have some idea and tested this ;-)

Code: Select all

   server {
        listen          domain.ru:8083;
        server_name     domain.ru;
        root            /usr/local/vesta/web;
        charset         utf-8;
this code you already have in config, and something new for location /

before:

Code: Select all

   location / {
            expires max;
            index   index.php;
        }
now

Code: Select all

        
location / {
if ($host != $server_name) { rewrite ^ http://$host$request_uri? redirect; }
expires max;
index   index.php;
        }
You need add this string:
if ($host != $server_name) { rewrite ^ http://$host$request_uri? redirect; }
Top

Hund
Posts: 2
Joined: Sat Jan 07, 2017 1:15 pm

Re: Allow Panel access only in one domain
  • Quote

Post by Hund » Sat Jan 07, 2017 1:37 pm

Is it possible to access Roundcube and phpMyAdmin over only one domain? At this time I can reach the tools over every registred domain in Vesta. But I think it would be better to allow it only on a specific domain for security reasons.
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Allow Panel access only in one domain
  • Quote

Post by skurudo » Mon Jan 23, 2017 7:56 pm

Hund wrote:Is it possible to access Roundcube and phpMyAdmin over only one domain? At this time I can reach the tools over every registred domain in Vesta. But I think it would be better to allow it only on a specific domain for security reasons.
Manually - yes, possible.
Top


Post Reply
  • Print view

6 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password