0

How to change Ajenti WebRoot

LuffyyffuL 7 years ago updated 7 years ago 0

Hi,


I have two servers and one server web front connected to my two servers.


I would know how to change ajenti webroot by other text, for example, change "http://ip/ajenti" by "http://ip/ajenti_server_1" and "http://ip/ajenti_server_2"


NGINX config :


###########################
# HTTPS - AJENTI SERVER 1 #
###########################

location ~ /ajenti_srv_1.* {

rewrite (/ajenti_srv_1)$ / break;
rewrite /ajenti_srv_1/(.*) /$1 break;
proxy_redirect / /ajenti_srv_1/;
proxy_set_header Host $host;
proxy_set_header Origin http://$host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
}
###########################
# HTTPS - AJENTI SERVER 2 #
###########################

location ~ /ajenti_srv_2.* {

rewrite (/ajenti_srv_2)$ / break;
rewrite /ajenti_srv_2/(.*) /$1 break;
proxy_redirect / /ajenti_srv_2/;
proxy_set_header Host $host;
proxy_set_header Origin http://$host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
}


Thank you