Answer the question
In order to leave comments, you need to log in
Nginx and remote upstream?
I have a rail application with nginx on DigitalOcean, all on the same host. By virtue of the insanity laws of Belarus, I am obliged to be hosted by two and a half local hosts, which have tariffs like 5 sites for php + 1 base, or VDS for 100 bucks.
What I want is to take the cheapest vds, raise nginx there and forward all incoming to the current host, do not transfer anything anywhere. Is it real? How to set up a config? Will the delay increase a lot?
Do I just need to transfer the domain to a new ip?
Answer the question
In order to leave comments, you need to log in
Blocking DigitalOcean?
Here I wrote the answer, this solution will help you.
rewrite the domain to the IP of the new server and that's it.
Can be done with proxying and caching.
location / {
resolver 8.8.8.8;
proxy_cache my_cache;
proxy_pass https://original.example.com;
proxy_redirect off;
proxy_intercept_errors on;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header Host original.example.com;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question