개발모음집

nginx multiple domain 본문

Server

nginx multiple domain

void 2021. 3. 16. 10:00

velog.io/@taelee/nginx-reverse-proxy%EB%A6%AC%EB%B2%84%EC%8A%A4-%ED%94%84%EB%A1%9D%EC%8B%9C-%EC%A0%81%EC%9A%A9


sudo vim /etc/nginx/nginx.conf


server {
                listen 80;
                server_name startuplife.kr;
                access_log /var/log/nginx/access_life.log;
                error_log /var/log/nginx/error_life.log;
                location / {
                        proxy_pass http://49.247.137.175;
                        proxy_http_version 1.1;
                        proxy_set_header Upgrade $http_upgrade;
                        proxy_set_header Connection "upgrade";
                        proxy_set_header Host $host;
                }
        }

        server {
                listen 80;
                server_name startupcode.kr;
                access_log /var/log/nginx/access_code.log;
                error_log /var/log/nginx/error_code.log;
                location / {
                        proxy_pass https://49.247.136.184;
                        proxy_http_version 1.1;
                        proxy_set_header Upgrade $http_upgrade;
                        proxy_set_header Connection "upgrade";
                        proxy_set_header Host $host;
                }
        }


        server {
                listen 80;
                server_name startuphub.kr;
                access_log /var/log/nginx/access_hub.log;
                error_log /var/log/nginx/error_hub.log;
                location / {
                        proxy_pass http://49.247.137.225;
                        proxy_http_version 1.1;
                        proxy_set_header Upgrade $http_upgrade;
                        proxy_set_header Connection "upgrade";
                        proxy_set_header Host $host;
                }
        }

'Server' 카테고리의 다른 글

pm2 logrotate 에 대해서  (0) 2021.02.18
Docker로 nginx, netty 설치  (0) 2020.11.10
Solution for NodeJS MYSQL query result buffer  (0) 2020.03.13
리눅스 스왑메모리 추가하는 방법  (0) 2020.03.11
postman api를 web으로 출시하기  (0) 2020.02.13