{"id":9645,"date":"2025-09-30T04:16:37","date_gmt":"2025-09-30T04:16:37","guid":{"rendered":"https:\/\/ubiq.co\/tech-blog\/?p=9645"},"modified":"2025-10-06T04:58:00","modified_gmt":"2025-10-06T04:58:00","slug":"change-nginx-port-number-ubuntu","status":"publish","type":"post","link":"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/","title":{"rendered":"How to Change NGINX Port Number in Ubuntu"},"content":{"rendered":"\n<p>NGINX is a popular and powerful web server capable of handling high traffic and extreme server loads. By default, NGINX server runs on port 80. But sometimes system administrators may need to change NGINX port number for various reasons. In this article, we will learn how to change NGINX port number. Although we will cover these steps for Ubuntu, they can be used for any Linux system.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#Why_Change_Port_Number\" >Why Change Port Number<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#How_to_Change_NGINX_Port_Number_in_Ubuntu\" >How to Change NGINX Port Number in Ubuntu<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#1_Open_NGINX_Configuration_File\" >1. Open NGINX Configuration File<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#2_Change_Port_Number\" >2. Change Port Number<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#3_Restart_NGINX_Server\" >3. Restart NGINX Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#4_Verify_New_Port\" >4. Verify New Port<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#5_Modify_Upstream_Services\" >5. Modify Upstream Services<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#6_Modify_Downstream_Services\" >6. Modify Downstream Services<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_Change_Port_Number\"><\/span>Why Change Port Number<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There are several reasons why you may need to change port number of NGINX server.<\/p>\n\n\n\n<p>1. <strong>Improved Security<\/strong> &#8211; By default, NGINX runs on port 80. Most hackers and malicious bots target common ports like 80 for their attacks. By configuring NGINX to run on a non-standard port, you will make it difficult for automated scripts and bots to hack your server.<br>2. <strong>Run Multiple Services<\/strong> &#8211; If you are running other services such as Apache that also use port 80, then you may need to change NGINX port number.<br>3. <strong>For Testing Purposes<\/strong> &#8211; If you are running NGINX in a development or staging environment, then you can run it on a different port to avoid interfering with production server, that runs on port 80. This will allow you to run multiple NGINX instances on a single server.<br>4. <strong>Specific Application Requirements<\/strong> &#8211; Sometimes, you may need to run NGINX on a different port, simply to integrate with other systems. They may already be configured to read input from or send output to another port. So NGINX will need to listen to that port.<br>5. <strong>Firewall Rules<\/strong> &#8211; Many organizations block port 80 by default, for security purposes. They know that port 80 is a common target of online attacks and it is better to avoid using it completely. In such cases, you will need to change NGINX port number to something else.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Change_NGINX_Port_Number_in_Ubuntu\"><\/span>How to Change NGINX Port Number in Ubuntu<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Now let us look at the steps to change NGINX port Number in Ubuntu.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Open_NGINX_Configuration_File\"><\/span>1. Open NGINX Configuration File<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The first step is to open NGINX configuration file in a text editor. It is typically located at <em>\/etc\/nginx\/nginx.conf<\/em>. If you have site specific configuration file, then you will find it at <em>\/etc\/nginx\/sites-available<\/em>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo vi \/etc\/nginx\/nginx.conf<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Change_Port_Number\"><\/span>2. Change Port Number<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In the configuration file, look for <em>listen<\/em> directive in the <em>server<\/em> block. If you have multiple server blocks, then look for the required server block.<\/p>\n\n\n\n<p>Change the following line, as shown, to change port number from 80 to 8000.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">listen 80;<\/pre>\n\n\n\n<p>to <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">listen 8000;<\/pre>\n\n\n\n<p>Similarly, if you want to change HTTPS port from 443 to 8443, then modify the following rule.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">listen 443 ssl;<\/pre>\n\n\n\n<p>to<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">listen 8443 ssl;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Restart_NGINX_Server\"><\/span>3. Restart NGINX Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Save and close the file. Test NGINX configuration.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nginx -t<\/pre>\n\n\n\n<p>Restart NGINX server to apply changes.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo systemctl restart nginx<br>OR<br>$ sudo service nginx restart<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Verify_New_Port\"><\/span>4. Verify New Port<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>You can verify that NGINX is running on new port, using ss or netstat tool.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo ss -antpl | grep nginx<br>OR<br>$ sudo netstat -tlpn | grep nginx<br><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_Modify_Upstream_Services\"><\/span>5. Modify Upstream Services<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Generally, NGINX is used in combination another upstream service such as Apache web server. In such cases, you need to modify Apache configuration to communicate with NGINX on new port number.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6_Modify_Downstream_Services\"><\/span>6. Modify Downstream Services<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Generally, most incoming requests are parsed by firewall before being passed to NGINX server. So you will have to also modify downstream firewall rules by opening the new port and closing the old port. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this article, we have learnt how to change port number in NGINX. If you are running a high-traffic website, it is advisable to change the default port of NGINX server for security purposes. This will keep malicious hackers and bots from targeting your site for common vulnerabilities.<\/p>\n\n\n\n<p>Also read:<br><a href=\"https:\/\/ubiq.co\/tech-blog\/enable-cors-nginx\/\">How to Enable CORS in NGINX<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/increase-request-timeout-nginx\/\">How to Increase Request Timeout in NGINX<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-uninstall-nginx\/\">How to Uninstall NGINX Server<\/a><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you may need to change NGINX port number. Here are the steps to run NGINX on different port number.<\/p>\n","protected":false},"author":1,"featured_media":9665,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[181],"class_list":["post-9645","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nginx","tag-port-number"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Change NGINX Port Number in Ubuntu - Ubiq BI<\/title>\n<meta name=\"description\" content=\"Sometimes you may need to change NGINX port number. Here are the steps to run NGINX on different port number.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Change NGINX Port Number in Ubuntu - Ubiq BI\" \/>\n<meta property=\"og:description\" content=\"Sometimes you may need to change NGINX port number. Here are the steps to run NGINX on different port number.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/\" \/>\n<meta property=\"og:site_name\" content=\"Ubiq BI\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ubiqbi\" \/>\n<meta property=\"article:published_time\" content=\"2025-09-30T04:16:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-06T04:58:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/09\/change-nginx-port-number.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"301\" \/>\n\t<meta property=\"og:image:height\" content=\"201\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Sreeram Sreenivasan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:site\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sreeram Sreenivasan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/\"},\"author\":{\"name\":\"Sreeram Sreenivasan\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\"},\"headline\":\"How to Change NGINX Port Number in Ubuntu\",\"datePublished\":\"2025-09-30T04:16:37+00:00\",\"dateModified\":\"2025-10-06T04:58:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/\"},\"wordCount\":597,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/09\/change-nginx-port-number.jpg?fit=301%2C201&ssl=1\",\"keywords\":[\"port number\"],\"articleSection\":[\"Nginx\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/\",\"url\":\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/\",\"name\":\"How to Change NGINX Port Number in Ubuntu - Ubiq BI\",\"isPartOf\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/09\/change-nginx-port-number.jpg?fit=301%2C201&ssl=1\",\"datePublished\":\"2025-09-30T04:16:37+00:00\",\"dateModified\":\"2025-10-06T04:58:00+00:00\",\"author\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\"},\"description\":\"Sometimes you may need to change NGINX port number. Here are the steps to run NGINX on different port number.\",\"breadcrumb\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/09\/change-nginx-port-number.jpg?fit=301%2C201&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/09\/change-nginx-port-number.jpg?fit=301%2C201&ssl=1\",\"width\":301,\"height\":201,\"caption\":\"change nginx port number\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ubiq.co\/tech-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Change NGINX Port Number in Ubuntu\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#website\",\"url\":\"https:\/\/ubiq.co\/tech-blog\/\",\"name\":\"Ubiq BI\",\"description\":\"Build dashboards &amp; reports in minutes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\",\"name\":\"Sreeram Sreenivasan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"caption\":\"Sreeram Sreenivasan\"},\"description\":\"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/\"],\"url\":\"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Change NGINX Port Number in Ubuntu - Ubiq BI","description":"Sometimes you may need to change NGINX port number. Here are the steps to run NGINX on different port number.","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:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/","og_locale":"en_US","og_type":"article","og_title":"How to Change NGINX Port Number in Ubuntu - Ubiq BI","og_description":"Sometimes you may need to change NGINX port number. Here are the steps to run NGINX on different port number.","og_url":"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/","og_site_name":"Ubiq BI","article_publisher":"https:\/\/www.facebook.com\/ubiqbi","article_published_time":"2025-09-30T04:16:37+00:00","article_modified_time":"2025-10-06T04:58:00+00:00","og_image":[{"width":301,"height":201,"url":"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/09\/change-nginx-port-number.jpg","type":"image\/jpeg"}],"author":"Sreeram Sreenivasan","twitter_card":"summary_large_image","twitter_creator":"@UbiqBI","twitter_site":"@UbiqBI","twitter_misc":{"Written by":"Sreeram Sreenivasan","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#article","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/"},"author":{"name":"Sreeram Sreenivasan","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"headline":"How to Change NGINX Port Number in Ubuntu","datePublished":"2025-09-30T04:16:37+00:00","dateModified":"2025-10-06T04:58:00+00:00","mainEntityOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/"},"wordCount":597,"commentCount":0,"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/09\/change-nginx-port-number.jpg?fit=301%2C201&ssl=1","keywords":["port number"],"articleSection":["Nginx"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/","url":"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/","name":"How to Change NGINX Port Number in Ubuntu - Ubiq BI","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#primaryimage"},"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/09\/change-nginx-port-number.jpg?fit=301%2C201&ssl=1","datePublished":"2025-09-30T04:16:37+00:00","dateModified":"2025-10-06T04:58:00+00:00","author":{"@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"description":"Sometimes you may need to change NGINX port number. Here are the steps to run NGINX on different port number.","breadcrumb":{"@id":"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#primaryimage","url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/09\/change-nginx-port-number.jpg?fit=301%2C201&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/09\/change-nginx-port-number.jpg?fit=301%2C201&ssl=1","width":301,"height":201,"caption":"change nginx port number"},{"@type":"BreadcrumbList","@id":"https:\/\/ubiq.co\/tech-blog\/change-nginx-port-number-ubuntu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ubiq.co\/tech-blog\/"},{"@type":"ListItem","position":2,"name":"How to Change NGINX Port Number in Ubuntu"}]},{"@type":"WebSite","@id":"https:\/\/ubiq.co\/tech-blog\/#website","url":"https:\/\/ubiq.co\/tech-blog\/","name":"Ubiq BI","description":"Build dashboards &amp; reports in minutes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc","name":"Sreeram Sreenivasan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","caption":"Sreeram Sreenivasan"},"description":"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.","sameAs":["https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/"],"url":"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/09\/change-nginx-port-number.jpg?fit=301%2C201&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pbGGTT-2vz","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/9645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/comments?post=9645"}],"version-history":[{"count":18,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/9645\/revisions"}],"predecessor-version":[{"id":9711,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/9645\/revisions\/9711"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media\/9665"}],"wp:attachment":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media?parent=9645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/categories?post=9645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/tags?post=9645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}