{"id":421,"date":"2022-09-21T10:54:07","date_gmt":"2022-09-21T01:54:07","guid":{"rendered":"https:\/\/ubuntu.auctionpro.co.kr\/?page_id=421"},"modified":"2024-02-14T11:26:45","modified_gmt":"2024-02-14T02:26:45","slug":"nginx","status":"publish","type":"page","link":"https:\/\/ubuntu.auctionpro.co.kr\/?page_id=421","title":{"rendered":"Nginx(\uc5d4\uc9c4\uc5d1\uc2a4)"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Remark : apache \ub300\uc2e0  Nginx \ub97c \uc124\uce58\ud574 \ubcf8\ub2e4.<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">\ub7ec\uc2dc\uc544\uc758 \ud504\ub85c\uadf8\ub7a8 \uac1c\ubc1c\uc790\uc778 \uc774\uace0\ub974 \uc2dc\uc1fc\ube0c(Igor Sysoev)\uac00 \uac1c\ubc1c\ud558\uc5ec 2004\ub144 \ubc1c\ud45c\ud55c \ubaa8\ub4c8\ud654 \ubc0f \ud6a8\uc728\uc801\uc73c\ub85c \uc801\uc740 \uba54\ubaa8\ub9ac \uc0ac\uc6a9\uc73c\ub85c \uc544\ud30c\uce58(Apache) \ubcf4\ub2e4 \uc18d\ub3c4\uac00 \ube60\ub974\ub2e4.<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">1. sudo apt update \uc5c5\ub370\uc774\ud2b8 <\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \">sudo apt update<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2. sudo apt install nginx \uc124\uce58 <\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \">sudo apt install nginx<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">3. nginx \ub370\ubaac \uc2dc\uc791<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \" >sudo systemctl start nginx\nsudo systemctl enable nginx<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">4. nginx  \uc11c\ube44\uc2a4 \uc0c1\ud0dc \ubcf4\uae30<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \"># sudo systemctl status nginx\n\u25cf nginx.service - A high performance web server and a reverse proxy server\n     Loaded: loaded (\/lib\/systemd\/system\/nginx.service; enabled; vendor preset: enabled)\n     Active: active (running) since Wed 2022-09-21 10:28:48 KST; 21min ago\n       Docs: man:nginx(8)\n    Process: 24632 ExecStartPre=\/usr\/sbin\/nginx -t -q -g daemon on; master_process on; (code=exited, status=0\/SUCCESS)\n    Process: 24633 ExecStart=\/usr\/sbin\/nginx -g daemon on; master_process on; (code=exited, status=0\/SUCCESS)\n   Main PID: 24716 (nginx)\n      Tasks: 5 (limit: 1598)\n        CPU: 290ms\n     CGroup: \/system.slice\/nginx.service\n             \u251c\u250024716 nginx: master process \/usr\/sbin\/nginx -g daemon on; master_process on;\n             \u251c\u250024719 nginx: worker process\n             \u251c\u250024720 nginx: worker process\n             \u251c\u250024721 nginx: worker process\n             \u2514\u250024722 nginx: worker process\n\nSep 21 10:28:48 raspberrypi systemd[1]: Starting A high performance web server and a reverse proxy server...\nSep 21 10:28:48 raspberrypi systemd[1]: Started A high performance web server and a reverse proxy server.\n\n\n<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">5. nginx  default site config<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \">$ cd \/etc\/nginx\/sites-available\n$ sudo vi default \n\n# You should look at the following URL's in order to grasp a solid understanding\n# of Nginx configuration files in order to fully unleash the power of Nginx.\n# https:\/\/www.nginx.com\/resources\/wiki\/start\/\n# https:\/\/www.nginx.com\/resources\/wiki\/start\/topics\/tutorials\/config_pitfalls\/\n# https:\/\/wiki.debian.org\/Nginx\/DirectoryStructure\n#\n# In most cases, administrators will remove this file from sites-enabled\/ and\n# leave it as reference inside of sites-available where it will continue to be\n# updated by the nginx packaging team.\n#\n# This file will automatically load configuration files provided by other\n# applications, such as Drupal or WordPress. These applications will be made\n# available underneath a path with that package name, such as \/drupal8.\n#\n# Please see \/usr\/share\/doc\/nginx-doc\/examples\/ for more detailed examples.\n##\n\n# Default server configuration\n#\nserver {\n        listen 80 default_server;\n        listen [::]:80 default_server;\n\n        # SSL configuration\n        #\n        # listen 443 ssl default_server;\n        # listen [::]:443 ssl default_server;\n        #\n        # Note: You should disable gzip for SSL traffic.\n        # See: https:\/\/bugs.debian.org\/773332\n        #\n        # Read up on ssl_ciphers to ensure a secure configuration.\n        # See: https:\/\/bugs.debian.org\/765782\n        #\n        # Self signed certs generated by the ssl-cert package\n        # Don't use them in a production server!\n        #\n        # include snippets\/snakeoil.conf;\n\n        root \/var\/www\/html;\n\n        # Add index.php to the list if you are using PHP\n        index index.html index.htm index.nginx-debian.html;\n\n        server_name _;\n\n        location \/ {\n                # First attempt to serve request as file, then\n                # as directory, then fall back to displaying a 404.\n                try_files $uri $uri\/ =404;\n        }\n\n        # pass PHP scripts to FastCGI server\n        #\n        #location ~ \\.php$ {\n        #       include snippets\/fastcgi-php.conf;\n        #\n        #       # With php-fpm (or other unix sockets):\n        #       fastcgi_pass unix:\/run\/php\/php7.4-fpm.sock;\n        #       # With php-cgi (or other tcp sockets):\n        #       fastcgi_pass 127.0.0.1:9000;\n        #}\n\n        # deny access to .htaccess files, if Apache's document root\n        # concurs with nginx's one\n        #\n        #location ~ \/\\.ht {\n        #       deny all;\n        #}\n}\n\n\n# Virtual Host configuration for example.com\n#\n# You can move that to a different file under sites-available\/ and symlink that\n# to sites-enabled\/ to enable it.\n#\n#server {\n#       listen 80;\n#       listen [::]:80;\n#\n#       server_name example.com;\n#\n#       root \/var\/www\/example.com;\n#       index index.html;\n#\n#       location \/ {\n#               try_files $uri $uri\/ =404;\n#       }\n#}\n<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">5. \uc544\uc774\ud53c\ub97c \uc5f4\uc5b4 nginx  \uc0ac\uc774\ud2b8 \ud655\uc778 <\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"571\" height=\"273\" src=\"https:\/\/ubuntu.auctionpro.co.kr\/wp-content\/uploads\/2022\/09\/nginx.png\" alt=\"\" class=\"wp-image-427\" srcset=\"https:\/\/ubuntu.auctionpro.co.kr\/wp-content\/uploads\/2022\/09\/nginx.png 571w, https:\/\/ubuntu.auctionpro.co.kr\/wp-content\/uploads\/2022\/09\/nginx-300x143.png 300w\" sizes=\"auto, (max-width: 571px) 100vw, 571px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Remark : apache \ub300\uc2e0 Nginx \ub97c \uc124\uce58\ud574 \ubcf8\ub2e4. \ub7ec\uc2dc\uc544\uc758 \ud504\ub85c\uadf8\ub7a8 \uac1c\ubc1c\uc790\uc778 \uc774\uace0\ub974 \uc2dc\uc1fc\ube0c(Igor Sysoev)\uac00 \uac1c\ubc1c\ud558\uc5ec 2004\ub144 \ubc1c\ud45c\ud55c \ubaa8\ub4c8\ud654 \ubc0f \ud6a8\uc728\uc801\uc73c\ub85c \uc801\uc740 \uba54\ubaa8\ub9ac \uc0ac\uc6a9\uc73c\ub85c \uc544\ud30c\uce58(Apache) \ubcf4\ub2e4 \uc18d\ub3c4\uac00 \ube60\ub974\ub2e4. 1. sudo apt update \uc5c5\ub370\uc774\ud2b8 2. sudo apt install nginx \uc124\uce58 3. nginx \ub370\ubaac \uc2dc\uc791 4. nginx \uc11c\ube44\uc2a4 \uc0c1\ud0dc \ubcf4\uae30 5. nginx default site config 5. \uc544\uc774\ud53c\ub97c \uc5f4\uc5b4 &hellip;<br \/><a href=\"https:\/\/ubuntu.auctionpro.co.kr\/?page_id=421\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\"><span class=\"screen-reader-text\">Nginx(\uc5d4\uc9c4\uc5d1\uc2a4)<\/span> \ub354\ubcf4\uae30<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-421","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ubuntu.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntu.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ubuntu.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntu.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntu.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=421"}],"version-history":[{"count":5,"href":"https:\/\/ubuntu.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/421\/revisions"}],"predecessor-version":[{"id":529,"href":"https:\/\/ubuntu.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/421\/revisions\/529"}],"wp:attachment":[{"href":"https:\/\/ubuntu.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}