Answer the question
In order to leave comments, you need to log in
How to set up nginxx as a proxy to display another site?
OS ubuntu 16 x64
nginx version: nginx/1.10.0 (Ubuntu)
Task: when entering the IP VPS, what would be displayed the content of the site, for example ya.ru
Googled this topic How to set up site proxying in nginx?
The code
server {
listen 127.0.0.1 ;
server_name habrahabr.ru;
location / {
proxy_pass http://$http_host$request_uri;
proxy_set_header Host $http_host;
resolver 8.8.8.8;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question