{"id":3244,"date":"2015-12-11T11:04:07","date_gmt":"2015-12-11T11:04:07","guid":{"rendered":"https:\/\/cpanelplesk.com\/wp62\/?p=3244"},"modified":"2021-02-06T11:20:28","modified_gmt":"2021-02-06T11:20:28","slug":"3244-2","status":"publish","type":"post","link":"https:\/\/cpanelplesk.com\/wp62\/3244-2\/","title":{"rendered":"How to Install Nginx on Ubuntu"},"content":{"rendered":"<p><span style=\"color: #000000;\">Nginx is a free, open source, high-performance web server. If you need HTTP and HTTPS but don\u2019t want to run Apache, then Nginx is good choice at least for Linux.<\/span><!--more--><\/p>\n<h3>Install nginx<\/h3>\n<p><span style=\"color: #000000;\">First make sure the list of available packages is up to date:<br \/>\n<\/span><\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">apt-get -y update<\/pre>\n<\/div>\n<p><span style=\"color: #000000;\">Run the following command to install it:<\/span><\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">apt-get -y install nginx<\/pre>\n<\/div>\n<p><span style=\"color: #000000;\">Once the installation is done the nginx service should automatically start and start listening on <strong>port 80<\/strong>.<\/span><\/p>\n<p><span style=\"color: #000000;\">Find your server\u2019s IP address run the following command:<\/span><\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">ip addr show eth0 | grep inet<\/pre>\n<\/div>\n<p><span style=\"color: #000000;\">Your result may look similar to:<\/span><\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">inet xxx.xxx.xxx.xxx\/22 brd yyy.yyy.yyy.yyy scope global eth0<\/pre>\n<\/div>\n<p>Where <strong>xxx.xxx.xxx.xxx<\/strong> is the IP address of your server.<\/p>\n<p>Verify that nginx is running by visiting <strong>http:\/\/yourserverip<\/strong>\u00a0For example: <em>http:\/\/4.3.5.6<\/em>.<\/p>\n<h3>Manage the nginx Service<\/h3>\n<p>Here are the some example commands for Nginx:<\/p>\n<p>Start the nginx Service:<\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">service nginx start\r\n<\/pre>\n<\/div>\n<p>Stop the nginx Service:<\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">service nginx stop<\/pre>\n<\/div>\n<p>Restart the nginx Service:<\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">service nginx restart<\/pre>\n<\/div>\n<p>Check the Status of the nginx Service:<\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">service nginx status<\/pre>\n<\/div>\n<p>Assure that nginx starts at boot:<\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">update-rc.d nginx defaults<\/pre>\n<\/div>\n<p>Done.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nginx is a free, open source, high-performance web server. If you need HTTP and HTTPS but don\u2019t want to run Apache, then Nginx is good choice at least for Linux. [&#8230;]<\/p>\n<p><a class=\"understrap-read-more-link\" href=\"https:\/\/cpanelplesk.com\/wp62\/3244-2\/\">Continue Reading&#8230;<\/a><\/p>\n","protected":false},"author":19,"featured_media":3246,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-3244","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install Nginx on Ubuntu - cPanel Plesk<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cpanelplesk.com\/wp62\/3244-2\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Install Nginx on Ubuntu - cPanel Plesk\" \/>\n<meta name=\"twitter:description\" content=\"Nginx is a free, open source, high-performance web server. If you need HTTP and HTTPS but don\u2019t want to run Apache, then Nginx is good choice at least for Linux. [...]Continue Reading...\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/nginx-e1449831833586.png\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"samama\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/3244-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/3244-2\/\"},\"author\":{\"name\":\"samama\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/b5c17eff2915a029433dfd2d5a6e8465\"},\"headline\":\"How to Install Nginx on Ubuntu\",\"datePublished\":\"2015-12-11T11:04:07+00:00\",\"dateModified\":\"2021-02-06T11:20:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/3244-2\/\"},\"wordCount\":152,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\"},\"image\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/3244-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/nginx-e1449831833586.png\",\"articleSection\":[\"Linux\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/3244-2\/\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/3244-2\/\",\"name\":\"How to Install Nginx on Ubuntu - cPanel Plesk\",\"isPartOf\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/3244-2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/3244-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/nginx-e1449831833586.png\",\"datePublished\":\"2015-12-11T11:04:07+00:00\",\"dateModified\":\"2021-02-06T11:20:28+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/3244-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cpanelplesk.com\/wp62\/3244-2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/3244-2\/#primaryimage\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/nginx-e1449831833586.png\",\"contentUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/nginx-e1449831833586.png\",\"width\":200,\"height\":200},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/3244-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cpanelplesk.com\/wp62\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Nginx on Ubuntu\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#website\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/\",\"name\":\"cPanel Plesk\",\"description\":\"Blog on famous hosting control panels\",\"publisher\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cpanelplesk.com\/wp62\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\",\"name\":\"Farooq Omer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png\",\"contentUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png\",\"width\":300,\"height\":44,\"caption\":\"Farooq Omer\"},\"logo\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/b5c17eff2915a029433dfd2d5a6e8465\",\"name\":\"samama\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5ad71c1d187b45a3c1a68698160b5f6d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5ad71c1d187b45a3c1a68698160b5f6d?s=96&d=mm&r=g\",\"caption\":\"samama\"},\"url\":\"https:\/\/cpanelplesk.com\/wp62\/author\/samama\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Nginx on Ubuntu - cPanel Plesk","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cpanelplesk.com\/wp62\/3244-2\/","twitter_card":"summary_large_image","twitter_title":"How to Install Nginx on Ubuntu - cPanel Plesk","twitter_description":"Nginx is a free, open source, high-performance web server. If you need HTTP and HTTPS but don\u2019t want to run Apache, then Nginx is good choice at least for Linux. [...]Continue Reading...","twitter_image":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/nginx-e1449831833586.png","twitter_misc":{"Written by":"samama","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/cpanelplesk.com\/wp62\/3244-2\/#article","isPartOf":{"@id":"https:\/\/cpanelplesk.com\/wp62\/3244-2\/"},"author":{"name":"samama","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/b5c17eff2915a029433dfd2d5a6e8465"},"headline":"How to Install Nginx on Ubuntu","datePublished":"2015-12-11T11:04:07+00:00","dateModified":"2021-02-06T11:20:28+00:00","mainEntityOfPage":{"@id":"https:\/\/cpanelplesk.com\/wp62\/3244-2\/"},"wordCount":152,"commentCount":0,"publisher":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13"},"image":{"@id":"https:\/\/cpanelplesk.com\/wp62\/3244-2\/#primaryimage"},"thumbnailUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/nginx-e1449831833586.png","articleSection":["Linux"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/cpanelplesk.com\/wp62\/3244-2\/","url":"https:\/\/cpanelplesk.com\/wp62\/3244-2\/","name":"How to Install Nginx on Ubuntu - cPanel Plesk","isPartOf":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cpanelplesk.com\/wp62\/3244-2\/#primaryimage"},"image":{"@id":"https:\/\/cpanelplesk.com\/wp62\/3244-2\/#primaryimage"},"thumbnailUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/nginx-e1449831833586.png","datePublished":"2015-12-11T11:04:07+00:00","dateModified":"2021-02-06T11:20:28+00:00","breadcrumb":{"@id":"https:\/\/cpanelplesk.com\/wp62\/3244-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cpanelplesk.com\/wp62\/3244-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cpanelplesk.com\/wp62\/3244-2\/#primaryimage","url":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/nginx-e1449831833586.png","contentUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/12\/nginx-e1449831833586.png","width":200,"height":200},{"@type":"BreadcrumbList","@id":"https:\/\/cpanelplesk.com\/wp62\/3244-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cpanelplesk.com\/wp62\/"},{"@type":"ListItem","position":2,"name":"How to Install Nginx on Ubuntu"}]},{"@type":"WebSite","@id":"https:\/\/cpanelplesk.com\/wp62\/#website","url":"https:\/\/cpanelplesk.com\/wp62\/","name":"cPanel Plesk","description":"Blog on famous hosting control panels","publisher":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cpanelplesk.com\/wp62\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13","name":"Farooq Omer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/","url":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png","contentUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png","width":300,"height":44,"caption":"Farooq Omer"},"logo":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/"}},{"@type":"Person","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/b5c17eff2915a029433dfd2d5a6e8465","name":"samama","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5ad71c1d187b45a3c1a68698160b5f6d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5ad71c1d187b45a3c1a68698160b5f6d?s=96&d=mm&r=g","caption":"samama"},"url":"https:\/\/cpanelplesk.com\/wp62\/author\/samama\/"}]}},"_links":{"self":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts\/3244","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/comments?post=3244"}],"version-history":[{"count":0,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts\/3244\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/media\/3246"}],"wp:attachment":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/media?parent=3244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/categories?post=3244"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/tags?post=3244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}