{"id":3678,"date":"2019-07-18T21:32:21","date_gmt":"2019-07-18T18:32:21","guid":{"rendered":"https:\/\/kifarunix.com\/?p=3678"},"modified":"2019-07-18T21:32:22","modified_gmt":"2019-07-18T18:32:22","slug":"install-nginx-on-debian-10-buster","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-nginx-on-debian-10-buster\/","title":{"rendered":"Install Nginx on Debian 10 Buster"},"content":{"rendered":"\n<p>This guide will step you through how to install Nginx on Debian 10 Buster. <a rel=\"noreferrer noopener\" aria-label=\"Nginx (opens in a new tab)\" href=\"https:\/\/www.nginx.com\/\" target=\"_blank\">Nginx<\/a> is an opensource web server, reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, load balancer and an HTTP cache.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install Nginx on Debian 10 Buster<\/h2>\n\n\n\n<p>Nginx is available on the default Debian 10 Buster repos and can be installed using the APT package manager.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Run system update<\/h3>\n\n\n\n<p>To resynchronize your system packages to their latest versions, run the commands below<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt update\napt upgrade<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install Nginx on Debian 10 Buster<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt install nginx<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Running Nginx<\/h3>\n\n\n\n<p>Upon installation, Nginx is started and enabled to run on system boot.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl status nginx<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\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 Thu 2019-07-18 20:48:37 EAT; 17s ago\n     Docs: man:nginx(8)\n Main PID: 1497 (nginx)\n    Tasks: 2 (limit: 1150)\n   Memory: 3.1M\n   CGroup: \/system.slice\/nginx.service\n           \u251c\u25001497 nginx: master process \/usr\/sbin\/nginx -g daemon on; master_process on;\n           \u2514\u25001498 nginx: worker process<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl is-enabled nginx\nenabled<\/code><\/pre>\n\n\n\n<p>To stop or restart Nginx;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl stop nginx<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl restart nginx<\/code><\/pre>\n\n\n\n<p>To reload Nginx;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl reload nginx<\/code><\/pre>\n\n\n\n<p>To verify Nginx for any configuration errors;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>nginx -t<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Allow Nginx on Firewall<\/h3>\n\n\n\n<p>If UFW is running, allow access to Nginx.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ufw allow 'Nginx Full'<\/code><\/pre>\n\n\n\n<p>The above command open ports 80 (HTTP) and 443 (HTTPS) on firewall. If you need to open just port 80 (allow HTTP traffic) or port 443 (allow HTTPS traffic), you can run either of the commands below respectively.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ufw allow 'Nginx HTTP'<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ufw allow 'Nginx HTTPS'<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Accessing Nginx<\/h3>\n\n\n\n<p>To verify that Nginx is ready to server your web pages, navigate to the browser and enter the server IP address, <strong>http:\/\/&lt;server-IP><\/strong>.<\/p>\n\n\n\n<p>If all is well, you should land on Nginx welcome page.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/nginx-on-debian-10-buster.png\"><img loading=\"lazy\" decoding=\"async\" width=\"878\" height=\"258\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/nginx-on-debian-10-buster.png\" alt=\"Install Nginx on Debian 10 Buster\" class=\"wp-image-3679\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/nginx-on-debian-10-buster.png 878w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/nginx-on-debian-10-buster-768x226.png 768w\" sizes=\"(max-width: 878px) 100vw, 878px\" \/><\/a><\/figure>\n\n\n\n<p>Nginx is installed successfully on Debian 10 Buster<\/p>\n\n\n\n<p>You can also check our other articles using the below links;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-phpmyadmin-on-debian-10-buster\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install phpMyAdmin on Debian 10 Buster<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-lamp-stack-with-mariadb-10-on-debian-10-buster\/\" target=\"_blank\">Install LAMP Stack with MariaDB 10 on Debian 10 Buster<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-mariadb-10-on-debian-10-buster\/\">Install MariaDB 10 on Debian 10 Buster<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide will step you through how to install Nginx on Debian 10 Buster. Nginx is an opensource web server, reverse proxy server for HTTP,<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,304,253],"tags":[1039,229],"class_list":["post-3678","post","type-post","status-publish","format-standard","hentry","category-howtos","category-nginx","category-web-servers","tag-debian-10-buster","tag-nginx","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/3678"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=3678"}],"version-history":[{"count":2,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/3678\/revisions"}],"predecessor-version":[{"id":3681,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/3678\/revisions\/3681"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=3678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=3678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=3678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}