burnley
Regular Pleskian
I don't know what's the best way to approach this. We have vhosts with custom nginx configuration in /var/www/vhosts/system/<vhost>/conf/vhost_nginx.conf that looks like this:
location ~* ^/.*(locationA|locationB)$ {
<nginx specific processing here>
if ( $scheme = http )
{
proxy_pass http://IP.AD.DR.ESS
}
if ( $scheme = https )
{
proxy_pass http://IP.AD.DR.ESS
}
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
error_log "/var/log/nginx/error.log" warn;
}
When using the Plesk migration & transfer manager to migrate the subscription from serverA to serverB Plesk does all the right things, copies everything across and reconfigures everything, except for one little bit: IP.AD.DR.ESS in /var/www/vhosts/system/<vhost>/conf/vhost_nginx.conf is not adjusted to reflect the new IP configuration of the target server and I have to manually adjust it and reload nginx.
Is there any way I can get this remaining configuration carried across properly? Perhaps using the IP mapping mechanism? Some post-migration hooks using predefined variables?
Wonder what your thoughts are.
location ~* ^/.*(locationA|locationB)$ {
<nginx specific processing here>
if ( $scheme = http )
{
proxy_pass http://IP.AD.DR.ESS
}
if ( $scheme = https )
{
proxy_pass http://IP.AD.DR.ESS
}
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
error_log "/var/log/nginx/error.log" warn;
}
When using the Plesk migration & transfer manager to migrate the subscription from serverA to serverB Plesk does all the right things, copies everything across and reconfigures everything, except for one little bit: IP.AD.DR.ESS in /var/www/vhosts/system/<vhost>/conf/vhost_nginx.conf is not adjusted to reflect the new IP configuration of the target server and I have to manually adjust it and reload nginx.
Is there any way I can get this remaining configuration carried across properly? Perhaps using the IP mapping mechanism? Some post-migration hooks using predefined variables?
Wonder what your thoughts are.