How to setup a reverse proxy with Nginx.
# CLI
sudo nano /etc/nginx/sites-available/default
```
server {
listen 80;
server_name HOST_NAME_OF_YOUR_SIT;
location / {
proxy_pass [ Ссылка ];
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
server {
listen 80;
server_name HOST_NAME_OF_YOUR_SITE;
location / {
proxy_pass [ Ссылка ];
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
```
sudo systemctl reload nginx
Please like and subscribe!
#TateA
![](https://s2.save4k.ru/pic/0npmIczhrgA/maxresdefault.jpg)