{"id":2092,"date":"2024-01-30T12:30:00","date_gmt":"2024-01-30T18:30:00","guid":{"rendered":"https:\/\/www.linuxcloudvps.com\/blog\/?p=2092"},"modified":"2023-12-28T07:37:48","modified_gmt":"2023-12-28T13:37:48","slug":"how-to-install-nginx-on-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-nginx-on-ubuntu-22-04\/","title":{"rendered":"How to Install NGiNX on Ubuntu 22.04"},"content":{"rendered":"\n<p>In today&#8217;s tutorial, we will guide you on how to install Nginx on Ubuntu 22.04. Nginx (pronounced as &#8216;engine x&#8217;) is a free and open-source web server designed for maximum performance, stability and scalability. It can be also used for caching, reverse proxying different protocols, load balancing, media streaming, etc. <\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Nginx is used by more than 30% of all active websites, which makes it one of the most popular and widely used web servers in the world. It is used by some of the well-known companies such as WordPress, GitHub, Cloudflare, Dropbox and Netflix.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-prerequisites\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.linuxcloudvps.com\/ubuntu-cloud-vps.html\" target=\"_blank\" rel=\"noopener\" title=\"\">Ubuntu Cloud VPS<\/a> running with Ubuntu 22.04<\/li>\n\n\n\n<li>SSH access<\/li>\n\n\n\n<li>System user with sudo or root privileges<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Login and update the VPS<\/h2>\n\n\n\n<p>Login to your Ubuntu 22.04 VPS via SSH<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh root@IP_Address -p Port_number<\/pre>\n\n\n\n<p>Replace IP_Address and Port_number with the actual IP address of the VPS and SSH port number.<\/p>\n\n\n\n<p>Once you are in, run the following command to make sure that all installed packages are updated to the latest available version<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt update &amp;&amp; apt upgrade<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Method 1: Install Nginx from repository<\/h2>\n\n\n\n<p>Most of the major Linux distributions, including Ubuntu, have Nginx in their official repositories, so this is the easiest and most convenient way to install the web server. Nginx can be easily installed with Ubuntu&#8217;s package manager &#8216;apt&#8217;. The nginx package will install the web server with some Nginx modules and dependencies.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt -y install nginx<\/pre>\n\n\n\n<p>After the installation of the web server completes, start it and enable it to automatically start after a reboot<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">systemctl start nginx<br>systemctl enable nginx<\/pre>\n\n\n\n<p>To confirm that Nginx is up and running you can check the status of the service with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">systemctl status nginx<\/pre>\n\n\n\n<p>Output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\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)\n        Docs: man:nginx(8)\n        Process: 18046 ExecStartPre=\/usr\/sbin\/nginx -t -q -g daemon on; master_process      on; (code=exited, status=0\/SUCCESS)\n        Process: 18047 ExecStart=\/usr\/sbin\/nginx -g daemon on; master_process on; (code=exited, status=0\/SUCCESS)\n        Main PID: 18062 (nginx)\n        Tasks: 3 (limit: 4618)\n        Memory: 3.4M\n        CGroup: \/system.slice\/nginx.service\n       \u251c\u250018062 nginx: master process \/usr\/sbin\/nginx -g daemon on; master_process on;<\/pre>\n\n\n\n<p>You can also visit <code>http:\/\/IP_Address<\/code> and you should get the default Nginx landing page:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"1058\" height=\"431\" src=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2023\/12\/nginx-default-page.png\" alt=\"\" class=\"wp-image-2093\" srcset=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2023\/12\/nginx-default-page.png 1058w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2023\/12\/nginx-default-page-470x191.png 470w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2023\/12\/nginx-default-page-970x395.png 970w, https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2023\/12\/nginx-default-page-768x313.png 768w\" sizes=\"(max-width: 1058px) 100vw, 1058px\" \/><\/figure>\n<\/div>\n\n\n<p>In order to check the installed version and the configured arguments, run the following:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nginx -V<\/pre>\n\n\n\n<p>Output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nginx version: nginx\/1.18.0 (Ubuntu)\nbuilt with OpenSSL 1.1.1f 31 Mar 2020\nTLS SNI support enabled\nconfigure arguments: --with-cc-opt='-g -O2 -fdebug-prefix-map=\/build\/nginx-KTLRnK\/nginx-1.18.0=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC' ...<\/pre>\n\n\n\n<p>From the output above we can notice that Nginx version 1.18.0 is shipped with Ubuntu 22.04, which is not the latest version. If for some reason we need the latest release of the web server, or some custom third-party module enabled, we can use method 2 explained in this tutorial and install the web server from the source.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Method 2: Install Nginx from source<\/h2>\n\n\n\n<p>Nginx is available in two versions, the stable and mainline versions. In this step, we will explain how to compile and install the mainline version of Nginx which is up to date and comes with the latest features and security patches and it is more flexible compared to prebuild packages. Be advised that this version is reliable, but it may contain some experimental modules and new bugs.<\/p>\n\n\n\n<p>Nginx requires some libraries such as PCRE, zlib, and OpenSSL to function properly. We will download the source packages of these libraries and compile them from the source.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt install -y build-essential<\/pre>\n\n\n\n<p>Download, compile, and install the latest version of <code>PCRE<\/code><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wget https:\/\/ftp.pcre.org\/pub\/pcre\/pcre-8.45.tar.gz<br>tar -zxf pcre-8.45.tar.gz<br>cd pcre-8.45<br>.\/configure<br>make<br>make install<\/pre>\n\n\n\n<p>Download, compile, and install the latest version of <code>zlib<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wget http:\/\/zlib.net\/zlib-1.2.11.tar.gz<br>tar -zxf zlib-1.2.11.tar.gz<br>cd zlib-1.2.11<br>.\/configure<br>make<br>make install<\/pre>\n\n\n\n<p>Download, compile, and install the latest version of OpenSSL<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wget http:\/\/www.openssl.org\/source\/openssl-1.1.1g.tar.gz<br>tar -zxf openssl-1.1.1g.tar.gz<br>cd openssl-1.1.1g<br>.\/Configure darwin64-x86_64-cc --prefix=\/usr<br>make<br>make install<\/pre>\n\n\n\n<p>Download the source code of the latest mainline version of Nginx.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wget http:\/\/nginx.org\/download\/nginx-1.21.1.tar.gz<\/pre>\n\n\n\n<p>Unpack the downloaded tarball archive:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">tar zxf nginx-1.21.1.tar.gz<\/pre>\n\n\n\n<p>Configure the build options with the parameters of your choice. You can include configuration files, compiler options, and modules.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd nginx-1.21.1\/<br>.\/configure<br>--sbin-path=\/usr\/local\/nginx\/nginx<br>--conf-path=\/usr\/local\/nginx\/nginx.conf<br>--pid-path=\/usr\/local\/nginx\/nginx.pid<br>--with-pcre=..\/pcre-8.44<br>--with-zlib=..\/zlib-1.2.11<br>--with-http_ssl_module<br>--with-stream<br>--with-mail=dynamic<br>--add-module=\/usr\/build\/nginx-rtmp-module<br>--add-dynamic-module=\/usr\/build\/3party_module<\/pre>\n\n\n\n<p>After that, compile and install the build by running the following commands<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">make<br>make install<\/pre>\n\n\n\n<p>Once the installation is completed, run a check if the latest version of Nginx and the included options and modules are properly installed on your Ubuntu 22.04 VPS:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nginx -V<\/pre>\n\n\n\n<p>Output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nginx version: nginx\/1.18.0 (Ubuntu)<br>built with OpenSSL 1.1.1f 31 Mar 2020<br>TLS SNI support enabled<br>configure arguments: --with-cc-opt='-g -O2 -fdebug-prefix-map=\/build\/nginx-KTLRnK\/nginx-1.18.0=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=\/usr\/share\/nginx --conf-path=\/etc\/nginx\/nginx.conf --http-log-path=\/var\/log\/nginx\/access.log --error-log-path=\/var\/log\/nginx\/error.log --lock-path=\/var\/lock\/nginx.lock --pid-path=\/run\/nginx.pid<\/pre>\n\n\n\n<p>To start the web server run the following command<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nginx<\/pre>\n\n\n\n<p>And try to access <strong><em><code>http:\/\/IP_Address<\/code><\/em><\/strong> to confirm that the newly installed web server function properly.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p>Of course, you don\u2019t need to install Nginx on Ubuntu 22.04 yourself if you use one of our <a href=\"https:\/\/www.linuxcloudvps.com\/ubuntu-cloud-vps.html\" target=\"_blank\" rel=\"noopener\" title=\"Ubuntu VPS Hosting\">Ubuntu VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to install and set this up for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n\n\n\n<p><strong>PS. <\/strong>If you liked this post on how to install Nginx on Ubuntu 22.04, please share it with your friends on the social networks by using the share shortcuts below, or simply leave a comment in the comments section. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In today&#8217;s tutorial, we will guide you on how to install Nginx on Ubuntu 22.04. Nginx (pronounced as &#8216;engine x&#8217;) is a free and open-source web server designed for maximum performance, stability and scalability. It can be also used for caching, reverse proxying different protocols, load balancing, media streaming, etc.<\/p>\n","protected":false},"author":2,"featured_media":2101,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[274,208],"tags":[128,47],"class_list":["post-2092","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-open-source","category-ubuntu","tag-nginx","tag-ubuntu"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install NGiNX on Ubuntu 22.04 | LinuxCloudVPS Blog<\/title>\n<meta name=\"description\" content=\"In today&#039;s tutorial, we will guide you on how to install Nginx on Ubuntu 22.04. Nginx (pronounced as &#039;engine x&#039;) is a free and open-source web server\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-nginx-on-ubuntu-22-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install NGiNX on Ubuntu 22.04 | LinuxCloudVPS Blog\" \/>\n<meta property=\"og:description\" content=\"In today&#039;s tutorial, we will guide you on how to install Nginx on Ubuntu 22.04. Nginx (pronounced as &#039;engine x&#039;) is a free and open-source web server\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-nginx-on-ubuntu-22-04\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxCloudVPS Blog\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/LinuxCloudVPS\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-30T18:30:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2024\/01\/how-to-install-nginx-on-ubuntu-22-04.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"410\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@LinuxCloudVPS\" \/>\n<meta name=\"twitter:site\" content=\"@LinuxCloudVPS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-install-nginx-on-ubuntu-22-04\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-install-nginx-on-ubuntu-22-04\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/#\\\/schema\\\/person\\\/ed907227ee7d151c617e6d0fe74f531a\"},\"headline\":\"How to Install NGiNX on Ubuntu 22.04\",\"datePublished\":\"2024-01-30T18:30:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-install-nginx-on-ubuntu-22-04\\\/\"},\"wordCount\":662,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-install-nginx-on-ubuntu-22-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/how-to-install-nginx-on-ubuntu-22-04.webp\",\"keywords\":[\"nginx\",\"ubuntu\"],\"articleSection\":[\"open-source\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-install-nginx-on-ubuntu-22-04\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-install-nginx-on-ubuntu-22-04\\\/\",\"url\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-install-nginx-on-ubuntu-22-04\\\/\",\"name\":\"How to Install NGiNX on Ubuntu 22.04 | LinuxCloudVPS Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-install-nginx-on-ubuntu-22-04\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-install-nginx-on-ubuntu-22-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/how-to-install-nginx-on-ubuntu-22-04.webp\",\"datePublished\":\"2024-01-30T18:30:00+00:00\",\"description\":\"In today's tutorial, we will guide you on how to install Nginx on Ubuntu 22.04. Nginx (pronounced as 'engine x') is a free and open-source web server\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-install-nginx-on-ubuntu-22-04\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-install-nginx-on-ubuntu-22-04\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-install-nginx-on-ubuntu-22-04\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/how-to-install-nginx-on-ubuntu-22-04.webp\",\"contentUrl\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/how-to-install-nginx-on-ubuntu-22-04.webp\",\"width\":742,\"height\":410,\"caption\":\"how to install nginx on ubuntu 22.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-install-nginx-on-ubuntu-22-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install NGiNX on Ubuntu 22.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/\",\"name\":\"LinuxCloudVPS\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/#organization\",\"name\":\"LinuxCloudVPS\",\"url\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/logo.png\",\"width\":217,\"height\":25,\"caption\":\"LinuxCloudVPS\"},\"image\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"http:\\\/\\\/www.facebook.com\\\/LinuxCloudVPS\",\"https:\\\/\\\/x.com\\\/LinuxCloudVPS\",\"http:\\\/\\\/www.linkedin.com\\\/company\\\/linuxcloudvps-com\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/#\\\/schema\\\/person\\\/ed907227ee7d151c617e6d0fe74f531a\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"http:\\\/\\\/www.linuxcloudvps.com\\\/\"],\"url\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/author\\\/r0s3admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install NGiNX on Ubuntu 22.04 | LinuxCloudVPS Blog","description":"In today's tutorial, we will guide you on how to install Nginx on Ubuntu 22.04. Nginx (pronounced as 'engine x') is a free and open-source web server","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:\/\/www.linuxcloudvps.com\/blog\/how-to-install-nginx-on-ubuntu-22-04\/","og_locale":"en_US","og_type":"article","og_title":"How to Install NGiNX on Ubuntu 22.04 | LinuxCloudVPS Blog","og_description":"In today's tutorial, we will guide you on how to install Nginx on Ubuntu 22.04. Nginx (pronounced as 'engine x') is a free and open-source web server","og_url":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-nginx-on-ubuntu-22-04\/","og_site_name":"LinuxCloudVPS Blog","article_publisher":"http:\/\/www.facebook.com\/LinuxCloudVPS","article_published_time":"2024-01-30T18:30:00+00:00","og_image":[{"width":742,"height":410,"url":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2024\/01\/how-to-install-nginx-on-ubuntu-22-04.webp","type":"image\/webp"}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@LinuxCloudVPS","twitter_site":"@LinuxCloudVPS","twitter_misc":{"Written by":"admin","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-nginx-on-ubuntu-22-04\/#article","isPartOf":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-nginx-on-ubuntu-22-04\/"},"author":{"name":"admin","@id":"https:\/\/www.linuxcloudvps.com\/blog\/#\/schema\/person\/ed907227ee7d151c617e6d0fe74f531a"},"headline":"How to Install NGiNX on Ubuntu 22.04","datePublished":"2024-01-30T18:30:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-nginx-on-ubuntu-22-04\/"},"wordCount":662,"commentCount":0,"publisher":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-nginx-on-ubuntu-22-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2024\/01\/how-to-install-nginx-on-ubuntu-22-04.webp","keywords":["nginx","ubuntu"],"articleSection":["open-source","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-nginx-on-ubuntu-22-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-nginx-on-ubuntu-22-04\/","url":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-nginx-on-ubuntu-22-04\/","name":"How to Install NGiNX on Ubuntu 22.04 | LinuxCloudVPS Blog","isPartOf":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-nginx-on-ubuntu-22-04\/#primaryimage"},"image":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-nginx-on-ubuntu-22-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2024\/01\/how-to-install-nginx-on-ubuntu-22-04.webp","datePublished":"2024-01-30T18:30:00+00:00","description":"In today's tutorial, we will guide you on how to install Nginx on Ubuntu 22.04. Nginx (pronounced as 'engine x') is a free and open-source web server","breadcrumb":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-nginx-on-ubuntu-22-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-nginx-on-ubuntu-22-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-nginx-on-ubuntu-22-04\/#primaryimage","url":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2024\/01\/how-to-install-nginx-on-ubuntu-22-04.webp","contentUrl":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2024\/01\/how-to-install-nginx-on-ubuntu-22-04.webp","width":742,"height":410,"caption":"how to install nginx on ubuntu 22.04"},{"@type":"BreadcrumbList","@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-nginx-on-ubuntu-22-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.linuxcloudvps.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install NGiNX on Ubuntu 22.04"}]},{"@type":"WebSite","@id":"https:\/\/www.linuxcloudvps.com\/blog\/#website","url":"https:\/\/www.linuxcloudvps.com\/blog\/","name":"LinuxCloudVPS","description":"","publisher":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.linuxcloudvps.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.linuxcloudvps.com\/blog\/#organization","name":"LinuxCloudVPS","url":"https:\/\/www.linuxcloudvps.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.linuxcloudvps.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2023\/08\/logo.png","contentUrl":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2023\/08\/logo.png","width":217,"height":25,"caption":"LinuxCloudVPS"},"image":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["http:\/\/www.facebook.com\/LinuxCloudVPS","https:\/\/x.com\/LinuxCloudVPS","http:\/\/www.linkedin.com\/company\/linuxcloudvps-com"]},{"@type":"Person","@id":"https:\/\/www.linuxcloudvps.com\/blog\/#\/schema\/person\/ed907227ee7d151c617e6d0fe74f531a","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"admin"},"sameAs":["http:\/\/www.linuxcloudvps.com\/"],"url":"https:\/\/www.linuxcloudvps.com\/blog\/author\/r0s3admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/posts\/2092","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/comments?post=2092"}],"version-history":[{"count":4,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/posts\/2092\/revisions"}],"predecessor-version":[{"id":2100,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/posts\/2092\/revisions\/2100"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/media\/2101"}],"wp:attachment":[{"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/media?parent=2092"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/categories?post=2092"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/tags?post=2092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}