Allow Panel access only in one domain
Allow Panel access only in one domain
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
but I'm still able to access the login page from other domains... how can I achieve this? Thanks!
Code: Select all
listen mypaneldomain.com:8083;
# server_name _;
server_name mypaneldomain.com;
Re: Allow Panel access only in one domain
Did you restart vesta-nginx service after changes?
Code: Select all
service vesta restart
Re: Allow Panel access only in one domain
Yes, already restarted the service but I can still access the panel from other domains. Any ideas? Thanks!
Re: Allow Panel access only in one domain
Yep, I have some idea and tested this ;-)
this code you already have in config, and something new for location /
before:
now
You need add this string:
if ($host != $server_name) { rewrite ^ http://$host$request_uri? redirect; }
Code: Select all
server {
listen domain.ru:8083;
server_name domain.ru;
root /usr/local/vesta/web;
charset utf-8;
before:
Code: Select all
location / {
expires max;
index index.php;
}
Code: Select all
location / {
if ($host != $server_name) { rewrite ^ http://$host$request_uri? redirect; }
expires max;
index index.php;
}
if ($host != $server_name) { rewrite ^ http://$host$request_uri? redirect; }
Re: Allow Panel access only in one domain
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.
Re: Allow Panel access only in one domain
Manually - yes, possible.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.