{"id":1188,"date":"2023-04-21T05:49:43","date_gmt":"2023-04-21T05:49:43","guid":{"rendered":"https:\/\/formatswap.com\/blog\/?p=1188"},"modified":"2023-07-05T14:46:21","modified_gmt":"2023-07-05T14:46:21","slug":"how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts","status":"publish","type":"post","link":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\/","title":{"rendered":"How to Setup Nginx as a Reverse Proxy on Ubuntu 22.04 LTS"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"576\" loading=\"lazy\" src=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/nginx-reverse-proxy-tut-1024x576.jpg\" alt=\"nginx splash\" class=\"wp-image-1191\" srcset=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/nginx-reverse-proxy-tut-1024x576.jpg 1024w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/nginx-reverse-proxy-tut-300x169.jpg 300w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/nginx-reverse-proxy-tut-768x432.jpg 768w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/nginx-reverse-proxy-tut-1536x864.jpg 1536w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/nginx-reverse-proxy-tut.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">What is a reverse proxy server?<\/h2>\n\n\n\n<p>With the rise of cloud computing and <a href=\"https:\/\/en.wikipedia.org\/wiki\/Distributed_computing\">distributed systems<\/a>, it is common to have multiple web servers handling different aspects of a web application. However, managing and directing traffic to multiple servers can be a complex task. This is where setting up a Nginx reverse proxy can come in handy.<\/p>\n\n\n\n<p>A reverse proxy acts as an intermediary between the clients device and one or more web servers. It receives requests from clients and sends them to the appropriate server based on a configuration file. This allows for load balancing and distribution of traffic across multiple servers. This ensures that none of your servers are overwhelmed with requests.<\/p>\n\n\n\n<p>One of the primary benefits of using a reverse proxy is that it enables you to have multiple web servers handling different sections of your website or web application while still appearing as a single website to your users. For example, you could have the main section of your website handled by one Nginx server, while the additional subsections of your website are handled by a separate Nginx server.<\/p>\n\n\n\n<p>This will not only help with managing traffic but also provides an added layer of security by hiding the origin servers from external users. If one of the servers fails, the reverse proxy has the ability to automatically redirect traffic to other healthy servers. This ensures that the website will always remain available and responsive.<\/p>\n\n\n\n<p>Overall a reverse proxy is a powerful tool that can help manage traffic to multiple web servers, provide load balancing, improve security, and ensure high availability of web applications.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Initial Setup<\/h2>\n\n\n\n<p>This tutorial assumes that you already have a primary Nginx server set up (reverse proxy server). As well as a second Nginx server with the web app you want to appear on the first. If you need help installing a basic Nginx server, please read our <a href=\"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-and-configure-nginx-ubuntu-20-04\/\">How to install and configure Nginx<\/a> tutorial.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Overview of Goal<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"427\" loading=\"lazy\" src=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-1-1024x427.jpg\" alt=\"primary nginx reverse proxy web server\" class=\"wp-image-1195\" srcset=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-1-1024x427.jpg 1024w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-1-300x125.jpg 300w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-1-768x320.jpg 768w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-1.jpg 1406w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>For this example the above web server <strong>192.168.2.154<\/strong> (shown above) will be our primary web server where we will configure the Nginx reverse proxy.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"390\" loading=\"lazy\" src=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-2-1024x390.jpg\" alt=\"secondary nginx reverse proxy web server\" class=\"wp-image-1197\" srcset=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-2-1024x390.jpg 1024w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-2-300x114.jpg 300w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-2-768x293.jpg 768w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-2.jpg 1407w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The second web server <strong>192.168.2.155<\/strong> (shown above) hosts the web application we want to reverse proxy to the first server.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-1-subdir-before-1024x441.jpg\" alt=\"404 not found example reverse proxy\" class=\"wp-image-1198\" width=\"840\" height=\"361\" srcset=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-1-subdir-before-1024x441.jpg 1024w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-1-subdir-before-300x129.jpg 300w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-1-subdir-before-768x331.jpg 768w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-1-subdir-before.jpg 1404w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/figure>\n\n\n\n<p>The goal is to be able to access the second web servers content from a subfolder <strong>app2\/<\/strong> on the primary server. We want to be able to access the above URL on the primary server and have the blue website content load from the second server. Once we have finished configuring the reverse proxy, we will be able to access the second web servers content using a subfolder on the primary web server <strong>192.168.2.154\/app2<\/strong>\/.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Connect to the Primary Web Server<\/h2>\n\n\n\n<p>To get started connect to the primary web server. In my case this will be the<strong> 192.168.2.154<\/strong> server. Once connected open a new terminal window. Next create a new directory in the <strong>\/var\/www\/html\/<\/strong> folder. This is where you will access your secondary web server from. In my case I will use the command shown below.<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-black-background-color has-text-color has-background\"><code>sudo mkdir \/var\/www\/html\/app2<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Edit the Nginx Config File<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"481\" loading=\"lazy\" src=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/config-1-1024x481.jpg\" alt=\"nginx config file\" class=\"wp-image-1205\" srcset=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/config-1-1024x481.jpg 1024w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/config-1-300x141.jpg 300w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/config-1-768x360.jpg 768w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/config-1-1536x721.jpg 1536w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/config-1.jpg 1711w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Afterwards we need to edit the <strong>\/etc\/nginx\/sites-available\/default<\/strong> config file. Open the file in your favorite text editor and navigate to the <strong>location \/<\/strong> section inside the <strong>server { }<\/strong> parentheses as shown above. The command below will open the file with the nano text editor.<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-black-background-color has-text-color has-background\"><code>sudo nano \/etc\/nginx\/sites-available\/default<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Add a New Location<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"598\" loading=\"lazy\" src=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/config-2-add-new-lines-1-1024x598.jpg\" alt=\"add lines to nginx config for proxy_pass\" class=\"wp-image-1207\" srcset=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/config-2-add-new-lines-1-1024x598.jpg 1024w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/config-2-add-new-lines-1-300x175.jpg 300w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/config-2-add-new-lines-1-768x449.jpg 768w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/config-2-add-new-lines-1-1536x898.jpg 1536w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/config-2-add-new-lines-1.jpg 1706w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Now we need to add a new location under the first <strong>location \/<\/strong> block. Use the command block below as an example. Replace <strong>FOLDER_NAME<\/strong> with the name of the directory you want the secondary web server accessible from. This is the folder we created in the first step. We also need to replace <strong>IP_ADDRESS<\/strong> with the IP of the secondary web server.<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-black-background-color has-text-color has-background\"><code>location \/FOLDER_NAME {\n                proxy_pass http:\/\/<strong>IP_ADDRESS<\/strong>\/;\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}<\/code><\/pre>\n\n\n\n<p>After adding the location block, close and save the file with <strong>Crtl+X<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Restart Nginx<\/h2>\n\n\n\n<p>Next we need to restart the Nginx web server to apply our configuration changes. To do this we use the systemctl command below.<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-black-background-color has-text-color has-background\"><code>sudo systemctl restart nginx.service<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Test the Nginx Reverse Proxy<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"425\" loading=\"lazy\" src=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-1-subdir-after-2-1024x425.jpg\" alt=\"successful nginx reverse proxy test\" class=\"wp-image-1215\" srcset=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-1-subdir-after-2-1024x425.jpg 1024w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-1-subdir-after-2-300x125.jpg 300w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-1-subdir-after-2-768x319.jpg 768w, https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/web-app-1-subdir-after-2.jpg 1407w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Now we will need to test that the reverse proxy is working. We will navigate to our subfolder we created earlier using the primary web server <strong>192.168.2.154\/app2<\/strong>\/. Assuming the Nginx config was set up correctly your second web servers content should appear. You have now successfully configured a reverse proxy using the Nginx web server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Questions?<\/h2>\n\n\n\n<p>If you have any questions or comments feel free to leave them below.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related Resources<\/h2>\n\n\n\n<p>View our <a href=\"https:\/\/formatswap.com\/blog\/linux-tutorials\/5-reasons-to-switch-from-windows-10-to-linux\/\">5 Reasons to Switch from Windows 10 to Linux<\/a><a href=\"https:\/\/formatswap.com\/blog\/machine-learning-tutorials\/how-to-create-a-deepfake-video-using-deepfacelab\/\"> <\/a>tutorial.<\/p>\n\n\n\n<p>Learn <a href=\"https:\/\/formatswap.com\/blog\/machine-learning-tutorials\/how-to-generate-images-from-text-prompts-with-vqgan-clip-python-and-tensorflow\/\">How to Generate Images From Text Prompts with Python and TensorFlow<\/a>.<\/p>\n\n\n\n<p>Check out our <a href=\"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-openssh-with-keys-on-ubuntu-22-04\/\">How to Setup OpenSSH with Keys on Ubuntu 22.04<\/a> tutorial.<\/p>\n\n\n\n<p>View our <a href=\"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-mount-an-smb-samba-share-in-linux-with-cifs-utils\/\"><\/a><a href=\"https:\/\/formatswap.com\/blog\/machine-learning-tutorials\/deep-learning-image-style-transfer-tutorial-using-neural-style-pt\/\">Deep Learning Image Style Transfer Tutorial Using Neural Style Pt<\/a> tutorial.<\/p>\n\n\n\n<p>Learn <a href=\"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\/\">How to Setup Nginx as a Reverse Proxy on Ubuntu 22.04 LTS.<\/a><\/p>\n\n\n\n<p>Learn <a href=\"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-an-nginx-rtmp-server-in-ubuntu-22-04\/\"><\/a><a href=\"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-install-an-nginx-rtmp-server-in-ubuntu-22-04\/\">How to Install an Nginx RTMP Server in Ubuntu 22.04<\/a>.<\/p>\n\n\n\n<p>View all of our available online tools and converters at <a href=\"https:\/\/formatswap.com\" target=\"_blank\" rel=\"noreferrer noopener\">Formatswap.com<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is a reverse proxy server? With the rise of cloud computing and distributed systems, it is common to have multiple web servers handling different aspects of a web application. However, managing and directing traffic to multiple servers can be a complex task. This is where setting up a Nginx reverse proxy can come in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","pagelayer_contact_templates":[],"_pagelayer_content":"","footnotes":""},"categories":[4],"tags":[8,14,31],"class_list":["post-1188","post","type-post","status-publish","format-standard","hentry","category-linux-tutorials","tag-linux","tag-tutorial","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 Setup Nginx as a Reverse Proxy on Ubuntu 22.04 LTS - Format Swap - Tech Tutorials<\/title>\n<meta name=\"description\" content=\"How to easily configure a Nginx reverse proxy in Ubuntu 22.04. Reverse proxies allow you to have multiple web servers on a single domain.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Setup Nginx as a Reverse Proxy on Ubuntu 22.04 LTS - Format Swap - Tech Tutorials\" \/>\n<meta property=\"og:description\" content=\"How to easily configure a Nginx reverse proxy in Ubuntu 22.04. Reverse proxies allow you to have multiple web servers on a single domain.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\/\" \/>\n<meta property=\"og:site_name\" content=\"Format Swap - Tech Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-21T05:49:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-05T14:46:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/nginx-reverse-proxy-tut-1024x576.jpg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\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=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/#\\\/schema\\\/person\\\/3d01ee8e1e4f3718cfcc57eeb8ad6188\"},\"headline\":\"How to Setup Nginx as a Reverse Proxy on Ubuntu 22.04 LTS\",\"datePublished\":\"2023-04-21T05:49:43+00:00\",\"dateModified\":\"2023-07-05T14:46:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\\\/\"},\"wordCount\":825,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/nginx-reverse-proxy-tut-1024x576.jpg\",\"keywords\":[\"linux\",\"tutorial\",\"ubuntu\"],\"articleSection\":[\"Linux Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\\\/\",\"url\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\\\/\",\"name\":\"How to Setup Nginx as a Reverse Proxy on Ubuntu 22.04 LTS - Format Swap - Tech Tutorials\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/nginx-reverse-proxy-tut-1024x576.jpg\",\"datePublished\":\"2023-04-21T05:49:43+00:00\",\"dateModified\":\"2023-07-05T14:46:21+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/#\\\/schema\\\/person\\\/3d01ee8e1e4f3718cfcc57eeb8ad6188\"},\"description\":\"How to easily configure a Nginx reverse proxy in Ubuntu 22.04. Reverse proxies allow you to have multiple web servers on a single domain.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\\\/#primaryimage\",\"url\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/nginx-reverse-proxy-tut.jpg\",\"contentUrl\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/nginx-reverse-proxy-tut.jpg\",\"width\":1920,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/linux-tutorials\\\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Setup Nginx as a Reverse Proxy on Ubuntu 22.04 LTS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/\",\"name\":\"Format Swap - Tech Tutorials\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/#\\\/schema\\\/person\\\/3d01ee8e1e4f3718cfcc57eeb8ad6188\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/55cb3548d8c931eac3f2facbca246c6bde86082f48ca304906d7da2214191b72?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/55cb3548d8c931eac3f2facbca246c6bde86082f48ca304906d7da2214191b72?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/55cb3548d8c931eac3f2facbca246c6bde86082f48ca304906d7da2214191b72?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\\\/\\\/formatswap.com\\\/blog\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCsIPLkRPTbbTaT8YX0Dh2-A\"],\"url\":\"https:\\\/\\\/formatswap.com\\\/blog\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Setup Nginx as a Reverse Proxy on Ubuntu 22.04 LTS - Format Swap - Tech Tutorials","description":"How to easily configure a Nginx reverse proxy in Ubuntu 22.04. Reverse proxies allow you to have multiple web servers on a single domain.","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:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\/","og_locale":"en_US","og_type":"article","og_title":"How to Setup Nginx as a Reverse Proxy on Ubuntu 22.04 LTS - Format Swap - Tech Tutorials","og_description":"How to easily configure a Nginx reverse proxy in Ubuntu 22.04. Reverse proxies allow you to have multiple web servers on a single domain.","og_url":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\/","og_site_name":"Format Swap - Tech Tutorials","article_published_time":"2023-04-21T05:49:43+00:00","article_modified_time":"2023-07-05T14:46:21+00:00","og_image":[{"url":"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/nginx-reverse-proxy-tut-1024x576.jpg","type":"","width":"","height":""}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\/#article","isPartOf":{"@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\/"},"author":{"name":"admin","@id":"https:\/\/formatswap.com\/blog\/#\/schema\/person\/3d01ee8e1e4f3718cfcc57eeb8ad6188"},"headline":"How to Setup Nginx as a Reverse Proxy on Ubuntu 22.04 LTS","datePublished":"2023-04-21T05:49:43+00:00","dateModified":"2023-07-05T14:46:21+00:00","mainEntityOfPage":{"@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\/"},"wordCount":825,"commentCount":0,"image":{"@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\/#primaryimage"},"thumbnailUrl":"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/nginx-reverse-proxy-tut-1024x576.jpg","keywords":["linux","tutorial","ubuntu"],"articleSection":["Linux Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\/","url":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\/","name":"How to Setup Nginx as a Reverse Proxy on Ubuntu 22.04 LTS - Format Swap - Tech Tutorials","isPartOf":{"@id":"https:\/\/formatswap.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\/#primaryimage"},"image":{"@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\/#primaryimage"},"thumbnailUrl":"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/nginx-reverse-proxy-tut-1024x576.jpg","datePublished":"2023-04-21T05:49:43+00:00","dateModified":"2023-07-05T14:46:21+00:00","author":{"@id":"https:\/\/formatswap.com\/blog\/#\/schema\/person\/3d01ee8e1e4f3718cfcc57eeb8ad6188"},"description":"How to easily configure a Nginx reverse proxy in Ubuntu 22.04. Reverse proxies allow you to have multiple web servers on a single domain.","breadcrumb":{"@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\/#primaryimage","url":"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/nginx-reverse-proxy-tut.jpg","contentUrl":"https:\/\/formatswap.com\/blog\/wp-content\/uploads\/2023\/04\/nginx-reverse-proxy-tut.jpg","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/formatswap.com\/blog\/linux-tutorials\/how-to-setup-nginx-as-a-reverse-proxy-on-ubuntu-22-04-lts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/formatswap.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Setup Nginx as a Reverse Proxy on Ubuntu 22.04 LTS"}]},{"@type":"WebSite","@id":"https:\/\/formatswap.com\/blog\/#website","url":"https:\/\/formatswap.com\/blog\/","name":"Format Swap - Tech Tutorials","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/formatswap.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/formatswap.com\/blog\/#\/schema\/person\/3d01ee8e1e4f3718cfcc57eeb8ad6188","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/55cb3548d8c931eac3f2facbca246c6bde86082f48ca304906d7da2214191b72?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/55cb3548d8c931eac3f2facbca246c6bde86082f48ca304906d7da2214191b72?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/55cb3548d8c931eac3f2facbca246c6bde86082f48ca304906d7da2214191b72?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/formatswap.com\/blog","https:\/\/www.youtube.com\/channel\/UCsIPLkRPTbbTaT8YX0Dh2-A"],"url":"https:\/\/formatswap.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/posts\/1188","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/comments?post=1188"}],"version-history":[{"count":4,"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/posts\/1188\/revisions"}],"predecessor-version":[{"id":1373,"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/posts\/1188\/revisions\/1373"}],"wp:attachment":[{"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/media?parent=1188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/categories?post=1188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/formatswap.com\/blog\/wp-json\/wp\/v2\/tags?post=1188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}