Загрузка страницы

Run Multiple Site from one IP with reverse proxy Nginx

How to run multiple sites on one web-server using Nginx by creating a virtual host.

Also shows how to host dynamic content using port 8080 and 8081

Free Trial on Digital Ocean: https://m.do.co/c/8add28fb64fc

Helpful sites:
https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-18-04
http://nginx.org/en/docs/http/request_processing.html

----------------------------------------------------------------------------------------------
commands used during video:

sudo apt install nginx

---show content in "site enable"

unlink default

-- create new conf file in conf.d

newsite.conf
--- past server block into .conf file
server {
listen 80 default_server;
server_name yourdomain1.xyz www.yourdomain1.xyz;

location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8081;
}

}

server {
listen 80;
server_name yourdomain2.info www.yourdomain2.info;

location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8080;
}
}

nginx -t

systemctl reload nginx

systemctl status nginux

Видео Run Multiple Site from one IP with reverse proxy Nginx канала Juan Nadal
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
8 марта 2019 г. 9:12:48
00:07:45
Яндекс.Метрика