{"id":1174,"date":"2023-03-24T21:54:45","date_gmt":"2023-03-24T12:54:45","guid":{"rendered":"https:\/\/www.gyuroot.com\/wordpress\/?p=1174"},"modified":"2023-07-04T22:13:03","modified_gmt":"2023-07-04T13:13:03","slug":"sprint-nginx-web-server-hands-on","status":"publish","type":"post","link":"https:\/\/www.gyuroot.com\/wordpress\/?p=1174","title":{"rendered":"[Sprint] nginx Web Server Hands-on"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_63 counter-hierarchy ez-toc-counter ez-toc-white ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >\ubaa9\ucc28<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.gyuroot.com\/wordpress\/?p=1174\/#1_nginx_%EC%84%A4%EC%B9%98\" title=\"1. nginx \uc124\uce58\">1. nginx \uc124\uce58<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.gyuroot.com\/wordpress\/?p=1174\/#2_nginxconf_%ED%8C%8C%EC%9D%BC_%EA%B5%AC%EC%A1%B0_%ED%99%95%EC%9D%B8%ED%95%98%EA%B8%B0\" title=\"2. nginx.conf \ud30c\uc77c \uad6c\uc870 \ud655\uc778\ud558\uae30\">2. nginx.conf \ud30c\uc77c \uad6c\uc870 \ud655\uc778\ud558\uae30<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.gyuroot.com\/wordpress\/?p=1174\/#3_Hands-On_%EA%B8%B0%EB%B3%B8_%EC%83%98%ED%94%8C_%ED%8E%98%EC%9D%B4%EC%A7%80_%ED%85%8C%EC%8A%A4%ED%8A%B8\" title=\"3. Hands-On) \uae30\ubcf8 \uc0d8\ud50c \ud398\uc774\uc9c0 \ud14c\uc2a4\ud2b8\">3. Hands-On) \uae30\ubcf8 \uc0d8\ud50c \ud398\uc774\uc9c0 \ud14c\uc2a4\ud2b8<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.gyuroot.com\/wordpress\/?p=1174\/#4_%EA%B8%B0%EB%B3%B8root_%ED%8E%98%EC%9D%B4%EC%A7%80_%EC%9C%84%EC%B9%98_%ED%99%95%EC%9D%B8%ED%95%98%EA%B8%B0\" title=\"4. \uae30\ubcf8(root) \ud398\uc774\uc9c0 \uc704\uce58 \ud655\uc778\ud558\uae30\">4. \uae30\ubcf8(root) \ud398\uc774\uc9c0 \uc704\uce58 \ud655\uc778\ud558\uae30<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.gyuroot.com\/wordpress\/?p=1174\/#5_Hands-On_%EC%83%88%EB%A1%9C%EC%9A%B4_%EC%9B%B9_%ED%8E%98%EC%9D%B4%EC%A7%80_%ED%98%B8%EC%8A%A4%ED%8C%85%ED%95%98%EA%B8%B0\" title=\"5. Hands-On) \uc0c8\ub85c\uc6b4 \uc6f9 \ud398\uc774\uc9c0 \ud638\uc2a4\ud305\ud558\uae30\">5. Hands-On) \uc0c8\ub85c\uc6b4 \uc6f9 \ud398\uc774\uc9c0 \ud638\uc2a4\ud305\ud558\uae30<\/a><\/li><\/ul><\/nav><\/div>\n\n<p class=\"has-background\" style=\"background-color: rgb(241, 241, 239)\">&#x2b50; HTTP \uae30\ubc18\uc758 \uc11c\ubc84\ub97c \uc0dd\uc131\ud558\ub294 \uc18c\ud504\ud2b8\uc6e8\uc5b4\uc778 nginx\ub97c \uc0ac\uc6a9\ud558\uc5ec, \n\uc6f9 \uc11c\ubc84(Web Server)\ub97c \uc0dd\uc131\ud558\uc5ec \uc815\uc801 \uc6f9\ud398\uc774\uc9c0 \ud638\uc2a4\ud305\uc744 \ub530\ub77c \ud574\ubcf4\uc138\uc694.<\/p>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_nginx_%EC%84%A4%EC%B9%98\"><\/span><strong>1. nginx \uc124\uce58<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n<pre class=\"wp-block-code\"><code>$ sudo apt-get update\n$ sudo apt-get install nginx\n$ sudo nginx -v\n\nnginx version: nginx\/1.18.0 (Ubuntu)<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_nginxconf_%ED%8C%8C%EC%9D%BC_%EA%B5%AC%EC%A1%B0_%ED%99%95%EC%9D%B8%ED%95%98%EA%B8%B0\"><\/span><strong>2. nginx.conf \ud30c\uc77c \uad6c\uc870 \ud655\uc778\ud558\uae30<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n<pre class=\"wp-block-code\"><code>$ cat \/etc\/nginx\/nginx.conf\n\n###Core \ubaa8\ub4c8 \uc124\uc815 \ubd80\ubd84#\nuser www-data;\n\t#Default: nobody\n\t#\uc791\uc5c5\uc790 \ud504\ub85c\uc138\uc2a4\uc5d0\uc11c \uc0ac\uc6a9\ud558\ub294 \uc790\uaca9 \uc99d\uba85\uc744 user\uc815\uc758 \ud569\ub2c8\ub2e4.\n  #group\uc0dd\ub7b5 \ud558\uba74 group\uc774\ub984\uc774 \uac19\uc740 \uadf8\ub8f9\uc774 user\uc0ac\uc6a9\ub429\ub2c8\ub2e4.\nworker_processes auto;\n\t#Default: 1\n\t#nginx\uc758 \uc2e4\ud589\uac00\ub2a5\ud55c worker \ud504\ub85c\uc138\uc2a4\uc758 \uc218\ub97c \uc9c0\uc815\ud574 \uc904 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\t#nginx\ub294 master\uc640 worker\ud504\ub85c\uc138\uc2a4\ub85c \uad6c\uc131\ub418\uc5b4 \uc9c0\ub294\ub370\uc694.\n\t#\uacf5\uc2dd\ubb38\uc11c\uc5d0 \uc758\ud558\uba74, \ucd5c\uc801\uac12\uc740 cpu core\uc5d0\uc11c\ubd80\ud130 \ud558\ub4dc\ub4dc\ub77c\uc774\ube0c\ub4f1 \n\t#\uc5ec\ub7ec\uac00\uc9c0 \uc694\uc18c\uc5d0 \uc758\ud574\uc11c \uacb0\uc815\ub418\uc5b4 \uc9c0\uba70,auto\ub85c \uc124\uc815\ud558\uba74 \uc790\ub3d9\uc73c\ub85c \uc774 \uac12\uc744 \ucc3e\uc544\uc900\ub2e4\uace0 \ud569\ub2c8\ub2e4.\n\npid \/run\/nginx.pid;\n\t#nginx\uc758 \ud504\ub85c\uc138\uc2a4 \uc544\uc774\ub514 (pid)\uac00 \uc800\uc7a5\ub418\ub294 \uacbd\ub85c\ninclude \/etc\/nginx\/modules-enabled\/*.conf;\n\t#\ud3ec\ud568\uc2dc\ud0ac \uc678\ubd80\ud30c\uc77c\uc744 \uc815\uc758\ud55c\ub2e4. \n\t#\uc704\uc758 \ud30c\uc77c\uc5d0 \uc791\uc131\ub418\uc5b4\uc9c4 \ub0b4\uc6a9\ub4e4\uc744 \ud604\uc7ac \ud30c\uc77c\ub85c \uac00\uc838\uc624\ub294 \uac83\uc744 \ub73b<u>\n<\/u>#error_log  logs\/error.log;\n\t#nginx \uc758 \uc5d0\ub7ec \ub85c\uadf8\uac00 \uc313\uc774\ub294 \uacbd\ub85c\n#worker_rlimit_nofile 8192;\n\t#Worker process\ub4e4\uc5d0\uc11c \ucd5c\ub300\ub85c \uc5f4\ub9b0 \ud30c\uc77c\ub4e4\uc758 \uc218\ub97c \uc81c\ud55c\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\t#\uc774 \uc218\uac00 \ud074\uc218\ub85d \uba54\uc778 \ud504\ub85c\uc138\uc2a4\ub97c \uc7ac\uc2dc\uc791 \ud560 \ud544\uc694\uac00 \uc5c6\uc5b4\uc9c4\ub2e4\uace0 \ud569\ub2c8\ub2e4.\n\t#\ub300\uc2e0 \uc5f4\ub824 \uc788\ub294 \ud30c\uc77c\uc758 \uc218\ub9cc\ud07c \uc11c\ubc84\uc5d0 \ubd80\ud558\uac00 \ubc1c\uc0dd\n\nEvents \ube14\ub85d##\nevents {\n\tworker_connections 768;\n\t\t#Worker Process\uac00 \ub3d9\uc2dc\uc5d0 \ucc98\ub9ac\ud560 \uc218 \uc788\ub294 \uc811\uc18d\uc790\uc758 \uc218\ub97c \ub098\ud0c0\ub0b8\ub2e4. \n\t\t#\uae30\ubcf8\uc740 1024\ub85c \uc124\uc815\ub418\uc5b4\uc838 \uc788\ub2e4.\n\t\t#worker_rlimit_nofile \uc758 \uc22b\uc790\ub97c \ub118\uc5b4\uc11c\uba74 \uc548\ub428\n\t# multi_accept on;\n\t\t#off\ub85c \ub418\uc5b4\uc788\uc73c\uba74, worker\ud504\ub85c\uc138\uc2a4\ub294 \ud55c\ubc88\uc5d0 \ud558\ub098\uc758 \ucee4\ub125\uc158\ub9cc\uc744 \ud5c8\uc6a9\ud569\ub2c8\ub2e4.\n\t\t#on\uc73c\ub85c \ub418\uc5b4\uc788\ub2e4\uba74, \ubaa8\ub4e0 \uc0c8\ub85c\uc6b4 \ucee4\ub125\uc158\uc744 \ud55c\ubc88\uc5d0 \ub2e4 \ud5c8\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n}\n\n##http \ube14\ub85d##\nhttp {\n\n\t##\n\t# Basic Settings\n\t##\n\n\tsendfile on;\n\ttcp_nopush on;\n\ttypes_hash_max_size 2048;\n\t# server_tokens off;\n\n\t# server_names_hash_bucket_size 64;\n\t# server_name_in_redirect off;\n\n\tinclude \/etc\/nginx\/mime.types;\n\tdefault_type application\/octet-stream;\n\n\t##\n\t# SSL Settings\n\t##\n\n\tssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE\n\tssl_prefer_server_ciphers on;\n\n\t##\n\t# Logging Settings\n\t##\n\n\taccess_log \/var\/log\/nginx\/access.log;\n\terror_log \/var\/log\/nginx\/error.log;\n\n\t##\n\t# Gzip Settings\n\t##\n\n\tgzip on;\n\n\t# gzip_vary on;\n\t# gzip_proxied any;\n\t# gzip_comp_level 6;\n\t# gzip_buffers 16 8k;\n\t# gzip_http_version 1.1;\n\t# gzip_types text\/plain text\/css application\/json application\/javascript \n  #text\/xml application\/xml application\/xml+rss text\/javascript;\n\n\t##\n\t# Virtual Host Configs\n\t##\n\n\tinclude \/etc\/nginx\/conf.d\/*.conf;\n\tinclude \/etc\/nginx\/sites-enabled\/*;\n\n\t#upstream backend {\n\t#\tserver 127.0.0.1:3000;\n\t#\tkeepalive 32;\n\t#}\n\t#upstream \uc9c0\uc2dc\uc5b4\ub294 upstream\uc11c\ubc84\uc5d0 \ub300\ud574\uc11c \uc124\uc815\ud558\uae30 \uc704\ud55c \uac83\uc778\ub370\uc694.\n\t#\uc778\uc790\ub85c \uc124\uc815\ud560 upstream\uc11c\ubc84\uc758 \uc774\ub984\uc744 \ub123\uc5b4\uc8fc\uba74 \ub429\ub2c8\ub2e4.\n\t#\uc11c\ubc84\ub4e4\uc740 TCP\uc774\ub4e0 UNIX \ub3c4\uba54\uc778 \uc18c\ucf13\uc774\ub4e0 \ubaa8\ub450 listen\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\t#\uc544\ub798\uc5d0\uc11c\ub294 backend\ub77c\ub294 \uc774\ub984\uc73c\ub85c, \ub0b4\ubd80\uc758 nodeJS\uc758 3000\ud3ec\ud2b8 \uc11c\ubc84\ub85c \n\t#\uc5f0\uacb0\uc2dc\ucf1c \uc8fc\ub3c4\ub85d \ud558\uc600\ub124\uc694.\n\t#keepalive\ub97c \ud558\ub294 \uc774\uc720\ub294 proxy\uc11c\ubc84\ub85c\ubd80\ud130, \ub2e4\uc2dc \ub85c\uceec\uc758 nodejs\uc11c\ubc84\ub85c \uc5f0\uacb0\ub420 \ub54c,\n\t#\uc811\uc18d\uc774 \ub2e4\uc2dc \uc0dd\uc131\ub428\uc73c\ub85c \uc778\ud55c \ube44\ud6a8\uc728\uc744 \ub9c9\uae30 \uc704\ud574\uc11c \uc785\ub2c8\ub2e4.\n}\n\n##mail \ube14\ub85d##\n\n#mail {\n#\t# See sample authentication script at:\n#\t# http:\/\/wiki.nginx.org\/ImapAuthenticateWithApachePhpScript\n#\n#\t# auth_http localhost\/auth.php;\n#\t# pop3_capabilities &quot;TOP&quot; &quot;USER&quot;;\n#\t# imap_capabilities &quot;IMAP4rev1&quot; &quot;UIDPLUS&quot;;\n#\n#\tserver {\n#\t\tlisten     localhost:110;\n#\t\tprotocol   pop3;\n#\t\tproxy      on;\n#\t}\n#\n#\tserver {\n#\t\tlisten     localhost:143;\n#\t\tprotocol   imap;\n#\t\tproxy      on;\n#\t}\n#}\n\n\n##server \ube14\ub85d##\n#\ud55c \uc11c\ubc84(\ud55c \uac1c\uc758 ip)\uc5d0\uc11c \uac01\uac01\uc758 \ub3c4\uba54\uc778\uc5d0 \ub530\ub77c\uc11c \uc11c\ub85c \ub2e4\ub978 \ud398\uc774\uc9c0\ub97c \uc11c\ube44\uc2a4\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n#\uc608\ub97c\ub4e4\uc5b4, \uc11c\ub85c \ub2e4\ub978 \ub3c4\uba54\uc778 (minimilab-zzang.com\uacfc minimilab.com) \uc744 \n#\ud55c \uc11c\ubc84\uc5d0\uc11c \uc11c\ub85c \ub2e4\ub978 \ud398\uc774\uc9c0\ub97c \uc11c\ube44\uc2a4 \ud558\ub3c4\ub85d \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n#minimilab-zzang.com \ub3c4\uba54\uc778\uc73c\ub85c \uc694\uccad\uc774 \ub4e4\uc5b4\uc624\uba74 \/var\/www\/minimilab-zzang.com \n#\uc704\uce58\uc758 \ud398\uc774\uc9c0\ub97c \uc11c\ube44\uc2a4 \ud558\ub3c4\ub85d \ud558\uba70,\n#minimilab.com \ub3c4\uba54\uc778\uc73c\ub85c \uc694\uccad\uc774 \ub4e4\uc5b4\uc624\uba74 \/var\/www\/minimilab.com \n#\uc704\uce58\uc5d0\uc11c \ud398\uc774\uc9c0\ub97c \uc11c\ube44\uc2a4 \ud569\ub2c8\ub2e4.\n#server {\n#    server_name  minimilab-zzang.com;\n#    root \/var\/www\/minimilab-zzang.com\n#}\n\n#server {\n#    server_name  minimilab.com\n#    root \/var\/www\/minimilab.com\n#\n\n#location = \/robots.txt {\n#           root \/usr\/static; \/\/\ud30c\uc77c \uacbd\ub85c\n#        try_files \/robots.txt \/robots.txt;\n#    }\n#}\n#location \/ {\n#      proxy_pass         http:\/\/127.0.0.1\/;\n#      proxy_redirect     off;\n#\n#      proxy_set_header   Host             $host;\n#      proxy_set_header   X-Real-IP        $remote_addr;\n#      # proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for;\n\n#      client_max_body_size       10m;\n#      client_body_buffer_size    128k;\n\n#      client_body_temp_path      \/var\/nginx\/client_body_temp;\n\n#      proxy_connect_timeout      90;\n#      proxy_send_timeout         90;\n#      proxy_read_timeout         90;\n#      proxy_send_lowat           12000;\n\n#      proxy_buffer_size          4k;\n#      proxy_buffers              4 32k;\n#      proxy_busy_buffers_size    64k;\n#      proxy_temp_file_write_size 64k;\n\n#     proxy_temp_path            \/var\/nginx\/proxy_temp;\n\n#      charset  koi8-r;\n\n<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Hands-On_%EA%B8%B0%EB%B3%B8_%EC%83%98%ED%94%8C_%ED%8E%98%EC%9D%B4%EC%A7%80_%ED%85%8C%EC%8A%A4%ED%8A%B8\"><\/span>3. <strong>Hands-On) \uae30\ubcf8 \uc0d8\ud50c \ud398\uc774\uc9c0 \ud14c\uc2a4\ud2b8<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n<pre class=\"wp-block-code\"><code># nginx web server \uc2e4\ud589\n$ sudo systemctl nginx start<\/code><\/pre>\n\n\n<blockquote class=\"wp-block-quote has-text-color\" style=\"color: rgb(0, 0, 0)\">\n<p> <a href=\"http:\/\/loc\/\"><strong>http:\/\/loc<\/strong><\/a><strong>alhost \uc811\uc18d \ud655\uc778<\/strong><\/p>\n\n<\/blockquote>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.gyuroot.com\/wordpress\/wp-content\/uploads\/image-167-1024x165.png?v=1688455623\" alt=\"\"\/><\/figure>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_%EA%B8%B0%EB%B3%B8root_%ED%8E%98%EC%9D%B4%EC%A7%80_%EC%9C%84%EC%B9%98_%ED%99%95%EC%9D%B8%ED%95%98%EA%B8%B0\"><\/span>4. \uae30\ubcf8(root) \ud398\uc774\uc9c0 \uc704\uce58 \ud655\uc778\ud558\uae30<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n<pre class=\"wp-block-code\"><code>$ cat \/etc\/nginx\/sites-available\/default\n\nserver {\n  <span style=\"color: rgba(212, 76, 71, 1)\">## \uc0ac\uc6a9\ud560 port<\/span>\n\tlisten 80 default_server;\n\tlisten [::]:80 default_server;\n\n\t# SSL configuration\n\t#\n\t# listen 443 ssl default_server;\n\t# listen [::]:443 ssl default_server;\n\t#\n\t# Note: You should disable gzip for SSL traffic.\n\t# See: https:\/\/bugs.debian.org\/773332\n\t#\n\t# Read up on ssl_ciphers to ensure a secure configuration.\n\t# See: https:\/\/bugs.debian.org\/765782\n\t#\n\t# Self signed certs generated by the ssl-cert package\n\t# Don&#039;t use them in a production server!\n\t#\n\t# include snippets\/snakeoil.conf;\n\n<span style=\"color: rgba(212, 76, 71, 1)\">  ## root page \uc704\uce58<\/span>\n\troot \/var\/www\/html;\n\n\t# Add index.php to the list if you are using PHP\n\tindex index.html index.htm index.nginx-debian.html;\n\n\tserver_name _;\n\n\tlocation \/ {\n\t\t# First attempt to serve request as file, then\n\t\t# as directory, then fall back to displaying a 404.\n\t\ttry_files $uri $uri\/ =404;\n\t}\n\n\t# pass PHP scripts to FastCGI server\n\t#\n\t#location ~ .php$ {\n\t#\tinclude snippets\/fastcgi-php.conf;\n\t#\n\t#\t# With php-fpm (or other unix sockets):\n\t#\tfastcgi_pass unix:\/run\/php\/php7.4-fpm.sock;\n\t#\t# With php-cgi (or other tcp sockets):\n\t#\tfastcgi_pass 127.0.0.1:9000;\n\t#}\n\n\t# deny access to .htaccess files, if Apache&#039;s document root\n\t# concurs with nginx&#039;s one\n\t#\n\t#location ~ \/.ht {\n\t#\tdeny all;\n\t#}\n}<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_Hands-On_%EC%83%88%EB%A1%9C%EC%9A%B4_%EC%9B%B9_%ED%8E%98%EC%9D%B4%EC%A7%80_%ED%98%B8%EC%8A%A4%ED%8C%85%ED%95%98%EA%B8%B0\"><\/span>5. <strong>Hands-On) \uc0c8\ub85c\uc6b4 \uc6f9 \ud398\uc774\uc9c0 \ud638\uc2a4\ud305\ud558\uae30<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n<blockquote class=\"wp-block-quote has-text-color\" style=\"color: rgb(0, 0, 0)\">\n<p><strong>\uc0c8\ub85c\uc6b4 HTML \ud30c\uc77c \uc0dd\uc131<\/strong><\/p>\n\n<\/blockquote>\n\n\n<p class=\"has-text-color\" style=\"color: rgb(0, 0, 0)\">\/<strong>home\/oh\/codeStates\/nginxHandsOn\/index.html<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;My Awesome Web&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;h1&gt;Hello World&lt;\/h1&gt;\n    &lt;p&gt;This is for Codestates DevOps Bootcamp!&lt;\/p&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n<blockquote class=\"wp-block-quote has-text-color\" style=\"color: rgb(0, 0, 0)\">\n<p><strong>nginx.conf \ud30c\uc77c\uc758 Server \ube14\ub85d \uc218\uc815<\/strong><\/p>\n\n<\/blockquote>\n\n\n<pre class=\"wp-block-code\"><code>server {\n       listen 10024;\n       server_name localhost;\n\n       location \/ {\n           root \/home\/oh\/codeStates\/nginxHandsOn;\n           index index.html;\n       }\n}<\/code><\/pre>\n\n\n<blockquote class=\"wp-block-quote has-text-color\" style=\"color: rgb(0, 0, 0)\">\n<p><strong>\uc0c8\ub85c\uc6b4 \uc6f9 \ud398\uc774\uc9c0 \ud655\uc778\ud558\uae30<\/strong><\/p>\n\n<\/blockquote>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.gyuroot.com\/wordpress\/wp-content\/uploads\/image-168-1024x165.png?v=1688455627\" alt=\"\"\/><\/figure>\n\n","protected":false},"excerpt":{"rendered":"<p>&#x2b50; HTTP \uae30\ubc18\uc758 \uc11c\ubc84\ub97c \uc0dd\uc131\ud558\ub294 \uc18c\ud504\ud2b8\uc6e8\uc5b4\uc778 nginx\ub97c \uc0ac\uc6a9\ud558\uc5ec, \uc6f9 \uc11c\ubc84(Web Server)\ub97c \uc0dd\uc131\ud558\uc5ec \uc815\uc801 \uc6f9\ud398\uc774\uc9c0 \ud638\uc2a4\ud305\uc744 \ub530\ub77c \ud574\ubcf4\uc138\uc694. 1. nginx \uc124\uce58 2. nginx.conf \ud30c\uc77c \uad6c\uc870 \ud655\uc778\ud558\uae30 3. Hands-On) \uae30\ubcf8 \uc0d8\ud50c \ud398\uc774\uc9c0 \ud14c\uc2a4\ud2b8 http:\/\/localhost \uc811\uc18d \ud655\uc778 4. \uae30\ubcf8(root) \ud398\uc774\uc9c0 \uc704\uce58 \ud655\uc778\ud558\uae30 5. Hands-On) \uc0c8\ub85c\uc6b4 \uc6f9 \ud398\uc774\uc9c0 \ud638\uc2a4\ud305\ud558\uae30 \uc0c8\ub85c\uc6b4 HTML \ud30c\uc77c \uc0dd\uc131 \/home\/oh\/codeStates\/nginxHandsOn\/index.html nginx.conf \ud30c\uc77c\uc758 Server \ube14\ub85d \uc218\uc815 &#8230; <a title=\"[Sprint] nginx Web Server Hands-on\" class=\"read-more\" href=\"https:\/\/www.gyuroot.com\/wordpress\/?p=1174\" aria-label=\"More on [Sprint] nginx Web Server Hands-on\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":""},"categories":[45],"tags":[],"_links":{"self":[{"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1174"}],"collection":[{"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1174"}],"version-history":[{"count":1,"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1174\/revisions"}],"predecessor-version":[{"id":1194,"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1174\/revisions\/1194"}],"wp:attachment":[{"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gyuroot.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}