ubuntu@ip-172-26-9-33:~$ sudo apt install nginx Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libgd3 libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream nginx-common nginx-core Suggested packages: libgd-tools fcgiwrap nginx-doc The following NEW packages will be installed: libgd3 libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream nginx nginx-common nginx-core 0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded. Need to get 721 kB of archives. After this operation, 2597 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu focal-updates/main amd64 libgd3 amd64 2.2.5-5.2ubuntu2.1 [118 kB] Get:2 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu focal-updates/main amd64 nginx-common all 1.18.0-0ubuntu1.2 [37.5 kB] Get:3 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu focal-updates/main amd64 libnginx-mod-http-image-filter amd64 1.18.0-0ubuntu1.2 [14.4 kB] Get:4 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu focal-updates/main amd64 libnginx-mod-http-xslt-filter amd64 1.18.0-0ubuntu1.2 [12.7 kB] Get:5 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu focal-updates/main amd64 libnginx-mod-mail amd64 1.18.0-0ubuntu1.2 [42.5 kB] Get:6 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu focal-updates/main amd64 libnginx-mod-stream amd64 1.18.0-0ubuntu1.2 [67.3 kB] Get:7 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu focal-updates/main amd64 nginx-core amd64 1.18.0-0ubuntu1.2 [425 kB] Get:8 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu focal-updates/main amd64 nginx all 1.18.0-0ubuntu1.2 [3620 B] Fetched 721 kB in 0s (17.6 MB/s) Preconfiguring packages ... Selecting previously unselected package libgd3:amd64. (Reading database ... 116075 files and directories currently installed.) Preparing to unpack .../0-libgd3_2.2.5-5.2ubuntu2.1_amd64.deb ... Unpacking libgd3:amd64 (2.2.5-5.2ubuntu2.1) ... Selecting previously unselected package nginx-common. Preparing to unpack .../1-nginx-common_1.18.0-0ubuntu1.2_all.deb ... Unpacking nginx-common (1.18.0-0ubuntu1.2) ... Selecting previously unselected package libnginx-mod-http-image-filter. Preparing to unpack .../2-libnginx-mod-http-image-filter_1.18.0-0ubuntu1.2_amd64.deb ... Unpacking libnginx-mod-http-image-filter (1.18.0-0ubuntu1.2) ... Selecting previously unselected package libnginx-mod-http-xslt-filter. Preparing to unpack .../3-libnginx-mod-http-xslt-filter_1.18.0-0ubuntu1.2_amd64.deb ... Unpacking libnginx-mod-http-xslt-filter (1.18.0-0ubuntu1.2) ... Selecting previously unselected package libnginx-mod-mail. Preparing to unpack .../4-libnginx-mod-mail_1.18.0-0ubuntu1.2_amd64.deb ... Unpacking libnginx-mod-mail (1.18.0-0ubuntu1.2) ... Selecting previously unselected package libnginx-mod-stream. Preparing to unpack .../5-libnginx-mod-stream_1.18.0-0ubuntu1.2_amd64.deb ... Unpacking libnginx-mod-stream (1.18.0-0ubuntu1.2) ... Selecting previously unselected package nginx-core. Preparing to unpack .../6-nginx-core_1.18.0-0ubuntu1.2_amd64.deb ... Unpacking nginx-core (1.18.0-0ubuntu1.2) ... Selecting previously unselected package nginx. Preparing to unpack .../7-nginx_1.18.0-0ubuntu1.2_all.deb ... Unpacking nginx (1.18.0-0ubuntu1.2) ... Setting up nginx-common (1.18.0-0ubuntu1.2) ... Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /lib/systemd/system/nginx.service. Setting up libnginx-mod-http-xslt-filter (1.18.0-0ubuntu1.2) ... Setting up libgd3:amd64 (2.2.5-5.2ubuntu2.1) ... Setting up libnginx-mod-mail (1.18.0-0ubuntu1.2) ... Setting up libnginx-mod-http-image-filter (1.18.0-0ubuntu1.2) ... Setting up libnginx-mod-stream (1.18.0-0ubuntu1.2) ... Setting up nginx-core (1.18.0-0ubuntu1.2) ... Setting up nginx (1.18.0-0ubuntu1.2) ... Processing triggers for ufw (0.36-6ubuntu1) ... Processing triggers for systemd (245.4-4ubuntu3.15) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for libc-bin (2.31-0ubuntu9.2) ... ubuntu@ip-172-26-9-33:~$

ubuntu@ip-172-26-9-33:~$ systemctl status nginx.service ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2022-02-06 07:22:38 UTC; 3h 28min ago Docs: man:nginx(8) Main PID: 117267 (nginx) Tasks: 3 (limit: 4710) Memory: 4.2M CGroup: /system.slice/nginx.service ├─117267 nginx: master process /usr/sbin/nginx -g daemon on; master_process on; ├─117268 nginx: worker process └─117269 nginx: worker process

Feb 06 07:22:38 ip-172-26-9-33 systemd[1]: Starting A high performance web server and a reverse proxy server... Feb 06 07:22:38 ip-172-26-9-33 systemd[1]: Started A high performance web server and a reverse proxy server. ubuntu@ip-172-26-9-33:~$

ubuntu@ip-172-26-9-33:~$ sudo vi /etc/nginx/nginx.conf

| http { ## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; # server_tokens off; # server_names_hash_bucket_size 64; # server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream;

##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;

##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

##
# Gzip Settings
##
gzip on;
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;*
*include /etc/nginx/sites-enabled/*;

server {
    listen 80;
    server_name [prof17.p.ssafy.io](<http://prof17.p.ssafy.io:8080/job/teamNo2/>);
    location / {
        root /home/ubuntu/test_frontend_dist;
        index index.html index.htm;
        #proxy_set_header X-Real-IP $remote_addr;
        #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        #proxy_set_header Host $http_host;
        #proxy_set_header X-NginX-Proxy true;
        #proxy_pass [<http://255.255.255.255:3010/>](<http://3.35.30.17:3010/>);
        #proxy_redirect off;
    }

    error_page 404 /404.html;
        location = /40x.html {
    }

    error_page 500 502 503 504 /50x.html;
        location = /50x.html {
    }
}

}

#:wq

ubuntu@ip-172-26-9-33:~$ sudo nginx -s reload