{"id":16377,"date":"2026-07-09T11:23:28","date_gmt":"2026-07-09T04:23:28","guid":{"rendered":"https:\/\/interdata.vn\/blog\/?p=16377"},"modified":"2026-07-09T11:23:25","modified_gmt":"2026-07-09T04:23:25","slug":"nginx-la-gi","status":"publish","type":"post","link":"https:\/\/interdata.vn\/blog\/nginx-la-gi\/","title":{"rendered":"NGINX L\u00e0 G\u00ec? C\u00e1ch Ho\u1ea1t \u0110\u1ed9ng, 5 Vai Tr\u00f2 Ch\u00ednh &#038; So S\u00e1nh Chi Ti\u1ebft V\u1edbi Apache"},"content":{"rendered":"\n\n<style>\n.interdata-plan-carousel,.interdata-plan-carousel *{box-sizing:border-box}\n.interdata-plan-carousel{--blue:#005bea;--blue-dark:#004dcc;--text:#071832;--muted:#516173;--border:#d8e6fb;--bg:#f3f8ff;--shadow:0 5px 14px rgba(0,62,145,.08);container-type:inline-size;background:var(--bg);padding:14px 40px 18px;position:relative;overflow:hidden}\n.interdata-carousel-heading{color:#f00;font-family:Roboto,sans-serif;font-size:18px;line-height:1.35;font-weight:800;text-align:center;margin:0 0 14px}\n.interdata-plan-viewport{overflow:hidden;width:100%}\n.interdata-plan-track{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:0 0 4px}\n.interdata-plan-track::-webkit-scrollbar{display:none}\n.interdata-plan-card{flex:0 0 calc((100% - 36px)\/4);min-width:0;background:#fff;border:1px solid var(--border);border-radius:8px;padding:15px 10px 13px;min-height:370px;display:flex;flex-direction:column;scroll-snap-align:start;box-shadow:var(--shadow)}\n.interdata-plan-title{color:var(--blue-dark);font-size:16px;line-height:1.22;font-weight:800;text-align:center;margin:0 0 7px;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n.interdata-plan-price{color:var(--blue-dark);font-size:24px;line-height:1;font-weight:900;text-align:center;margin-bottom:12px;white-space:nowrap;letter-spacing:0}\n.interdata-plan-price span{font-size:10px;font-weight:800;margin-left:2px}\n.interdata-plan-badge{align-self:center;display:inline-flex;align-items:center;justify-content:center;background:#ff3934;color:#fff;border-radius:5px;padding:7px 8px;font-size:9px;line-height:1;font-weight:800;margin-bottom:15px;white-space:nowrap;max-width:100%}\n.interdata-plan-features{list-style:none!important;padding:0!important;margin:0!important}\n.interdata-plan-features li{display:flex;gap:7px;align-items:flex-start;color:var(--text);font-size:12px;line-height:1.35;font-weight:700;text-align:left;margin:0 0 10px!important;padding:0!important}\n.interdata-plan-icon{width:14px;min-width:14px;height:14px;color:#0069ff;margin-top:2px}\n.interdata-plan-icon svg{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}\n.interdata-plan-spacer{flex:1;min-height:16px}\n.interdata-plan-button{display:flex;align-items:center;justify-content:center;min-height:42px;width:100%;background:var(--blue);color:#fff!important;border-radius:5px;font-size:13px;font-weight:800;text-decoration:none!important;box-shadow:0 7px 14px rgba(0,91,234,.24);transition:transform .2s ease,background .2s ease}\n.interdata-plan-button:hover{background:var(--blue-dark);color:#fff!important;transform:translateY(-1px)}\n.interdata-carousel-arrow{position:absolute;top:50%;z-index:5;width:44px;height:54px;border:2px solid #fff!important;border-radius:999px;background:var(--blue)!important;color:#fff!important;box-shadow:0 8px 22px rgba(0,62,145,.32);display:flex!important;align-items:center;justify-content:center;cursor:pointer;transform:translateY(-35%);transition:background .2s ease,color .2s ease,opacity .2s ease,transform .2s ease}\n.interdata-carousel-arrow:hover{background:var(--blue-dark)!important;color:#fff!important;transform:translateY(-35%) scale(1.04)}\n.interdata-carousel-arrow:disabled{opacity:.78;cursor:not-allowed;background:#8aa6cf!important;color:#fff!important}\n.interdata-carousel-arrow:disabled:hover{background:#8aa6cf!important;color:#fff!important;transform:translateY(-35%)}\n.interdata-carousel-arrow svg{display:none!important}\n.interdata-carousel-arrow:before{content:none!important;display:none!important}\n.interdata-carousel-mark{display:block!important;color:#fff!important;font-family:Arial,Helvetica,sans-serif!important;font-size:38px!important;font-weight:900!important;line-height:1!important;text-align:center!important;pointer-events:none!important;transform:translateY(-2px)}\n.interdata-carousel-prev{left:14px}\n.interdata-carousel-prev .interdata-carousel-mark{margin-left:-2px}\n.interdata-carousel-next{right:14px}\n.interdata-carousel-next .interdata-carousel-mark{margin-right:-2px}\n@container (max-width:640px){.interdata-plan-carousel{padding:12px 38px 16px}.interdata-plan-card{flex-basis:calc((100% - 12px)\/2);min-height:370px}.interdata-carousel-heading{font-size:16px}}\n@container (max-width:480px){.interdata-plan-carousel{padding:12px 34px 16px}.interdata-plan-card{flex-basis:100%;min-height:360px}.interdata-plan-price{font-size:25px}.interdata-carousel-arrow{width:34px;height:44px}.interdata-carousel-mark{font-size:32px!important}.interdata-carousel-prev{left:5px}.interdata-carousel-next{right:5px}}\n<\/style>\n\n<div class=\"interdata-plan-carousel\" data-interdata-carousel>\n  <div class=\"interdata-carousel-heading\">Si\u00eau \u01afu \u0110\u00e3i VPS \/ CLOUD SERVER - Ti\u1ebft Ki\u1ec7m \u0110\u1ebfn 70%<\/div>\n\n  <svg width=\"0\" height=\"0\" style=\"position:absolute;visibility:hidden\" aria-hidden=\"true\">\n    <symbol id=\"id-icon-cpu\" viewBox=\"0 0 24 24\"><rect x=\"7\" y=\"7\" width=\"10\" height=\"10\" rx=\"2\"><\/rect><path d=\"M4 9h3M4 15h3M17 9h3M17 15h3M9 4v3M15 4v3M9 17v3M15 17v3\"><\/path><path d=\"M10 10h4v4h-4z\"><\/path><\/symbol>\n    <symbol id=\"id-icon-ram\" viewBox=\"0 0 24 24\"><rect x=\"4\" y=\"8\" width=\"16\" height=\"8\" rx=\"2\"><\/rect><path d=\"M7 16v2M11 16v2M15 16v2M19 16v2M7 11h1M11 11h1M15 11h1\"><\/path><\/symbol>\n    <symbol id=\"id-icon-storage\" viewBox=\"0 0 24 24\"><rect x=\"6\" y=\"3\" width=\"12\" height=\"18\" rx=\"2\"><\/rect><path d=\"M9 7h6\"><\/path><circle cx=\"12\" cy=\"16\" r=\"1.5\"><\/circle><\/symbol>\n    <symbol id=\"id-icon-network\" viewBox=\"0 0 24 24\"><path d=\"M5 12.5a10 10 0 0 1 14 0\"><\/path><path d=\"M8.5 16a5 5 0 0 1 7 0\"><\/path><path d=\"M12 19h.01\"><\/path><\/symbol>\n    <symbol id=\"id-icon-gift\" viewBox=\"0 0 24 24\"><rect x=\"3\" y=\"8\" width=\"18\" height=\"13\" rx=\"2\"><\/rect><path d=\"M12 8v13M3 12h18\"><\/path><path d=\"M7.5 8C6.1 8 5 6.9 5 5.5S6.1 3 7.5 3C10 3 12 8 12 8\"><\/path><path d=\"M16.5 8C17.9 8 19 6.9 19 5.5S17.9 3 16.5 3C14 3 12 8 12 8\"><\/path><\/symbol>\n  <\/svg>\n\n  <button class=\"interdata-carousel-arrow interdata-carousel-prev\" type=\"button\" aria-label=\"Xem 4 g\u00f3i tr\u01b0\u1edbc\">\n    <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M15 18l-6-6 6-6\"><\/path><\/svg>\n    <span class=\"interdata-carousel-mark\" aria-hidden=\"true\">&#8249;<\/span>\n  <\/button>\n\n  <div class=\"interdata-plan-viewport\">\n    <div class=\"interdata-plan-track\">\n      <article class=\"interdata-plan-card\">\n        <h3 class=\"interdata-plan-title\">Premium Base<\/h3>\n        <div class=\"interdata-plan-price\">299K<span>\/3 th\u00e1ng<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>2 vCore Intel<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>2GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>30GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Network: 300Mbps<\/li>\n        <\/ul>\n        <div class=\"interdata-plan-spacer\"><\/div>\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/best-value-plans-2026\/best-value-plans-premium-base\" target=\"_blank\" rel=\"nofollow sponsored noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\">\n        <h3 class=\"interdata-plan-title\">Premium Base<\/h3>\n        <div class=\"interdata-plan-price\">999K<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>3 vCore Intel<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>3GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>30GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Network: 300Mbps<\/li>\n        <\/ul>\n        <div class=\"interdata-plan-spacer\"><\/div>\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/cyber-week-2026\/premium-base\" target=\"_blank\" rel=\"nofollow sponsored noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\">\n        <h3 class=\"interdata-plan-title\">Premium Pro<\/h3>\n        <div class=\"interdata-plan-price\">2.599K<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>6 vCore Intel<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>8GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>80GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Network: 350Mbps<\/li>\n        <\/ul>\n        <div class=\"interdata-plan-spacer\"><\/div>\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/cyber-week-2026\/premium-pro\" target=\"_blank\" rel=\"nofollow sponsored noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\">\n        <h3 class=\"interdata-plan-title\">Premium Ultra<\/h3>\n        <div class=\"interdata-plan-price\">5.679K<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>12 vCore Intel<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>16GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>180GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Network: 450Mbps<\/li>\n        <\/ul>\n        <div class=\"interdata-plan-spacer\"><\/div>\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/cyber-week-2026\/premium-ultra\" target=\"_blank\" rel=\"nofollow sponsored noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\">\n        <h3 class=\"interdata-plan-title\">BD-CLOUD 1<\/h3>\n        <div class=\"interdata-plan-price\">988K<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>3 vCPU<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>3 GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>30 GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Network: 300 Mbps<\/li>\n        <\/ul>\n        <div class=\"interdata-plan-spacer\"><\/div>\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/cart.php?a=add&amp;pid=521&amp;billingcycle=annually\" target=\"_blank\" rel=\"nofollow sponsored noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\">\n        <h3 class=\"interdata-plan-title\">BD-CLOUD 2<\/h3>\n        <div class=\"interdata-plan-price\">2.988K<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>4 vCPU<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>8 GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>80 GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Network: 300 Mbps<\/li>\n        <\/ul>\n        <div class=\"interdata-plan-spacer\"><\/div>\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/cart.php?a=add&amp;pid=522&amp;billingcycle=annually\" target=\"_blank\" rel=\"nofollow sponsored noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\">\n        <h3 class=\"interdata-plan-title\">Cloud-Day - Base<\/h3>\n        <div class=\"interdata-plan-price\">2.666K<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-gift\"><\/use><\/svg><\/span>T\u1eb7ng 80GB S3 v\u00e0 1 n\u0103m s\u1eed d\u1ee5ng khi mua 2 n\u0103m tr\u1edf l\u00ean<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>4 vCPU AMD G3<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>6GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>60GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Network: 10Gbps<\/li>\n        <\/ul>\n        <div class=\"interdata-plan-spacer\"><\/div>\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/cloud-day-by-interdata-2026\/cloud-day-base\" target=\"_blank\" rel=\"nofollow sponsored noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\">\n        <h3 class=\"interdata-plan-title\">Cloud-Day - Pro<\/h3>\n        <div class=\"interdata-plan-price\">5.666K<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-gift\"><\/use><\/svg><\/span>T\u1eb7ng 200GB S3 v\u00e0 1 n\u0103m s\u1eed d\u1ee5ng khi mua 2 n\u0103m tr\u1edf l\u00ean<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>8 vCPU AMD G3<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>12GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>160GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Network: 10Gbps<\/li>\n        <\/ul>\n        <div class=\"interdata-plan-spacer\"><\/div>\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/cloud-day-by-interdata-2026\/cloud-day-pro\" target=\"_blank\" rel=\"nofollow sponsored noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n    <\/div>\n  <\/div>\n\n  <button class=\"interdata-carousel-arrow interdata-carousel-next\" type=\"button\" aria-label=\"Xem 4 g\u00f3i ti\u1ebfp theo\">\n    <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M9 18l6-6-6-6\"><\/path><\/svg>\n    <span class=\"interdata-carousel-mark\" aria-hidden=\"true\">&#8250;<\/span>\n  <\/button>\n<\/div>\n\n<script>\n(function(){\n  function setupInterDataCarousel(root){\n    var track=root.querySelector('.interdata-plan-track');\n    var prev=root.querySelector('.interdata-carousel-prev');\n    var next=root.querySelector('.interdata-carousel-next');\n    if(!track||!prev||!next||track.dataset.ready==='1')return;\n    track.dataset.ready='1';\n\n    function pageWidth(){\n      return track.clientWidth;\n    }\n\n    function updateButtons(){\n      var maxScroll=track.scrollWidth-track.clientWidth-2;\n      prev.disabled=track.scrollLeft<=2;\n      next.disabled=track.scrollLeft>=maxScroll;\n    }\n\n    prev.addEventListener('click',function(){\n      track.scrollBy({left:-pageWidth(),behavior:'smooth'});\n    });\n\n    next.addEventListener('click',function(){\n      track.scrollBy({left:pageWidth(),behavior:'smooth'});\n    });\n\n    track.addEventListener('scroll',function(){\n      window.requestAnimationFrame(updateButtons);\n    });\n\n    window.addEventListener('resize',updateButtons);\n    updateButtons();\n  }\n\n  function initInterDataCarousels(){\n    document.querySelectorAll('[data-interdata-carousel]').forEach(setupInterDataCarousel);\n  }\n\n  if(document.readyState==='loading'){\n    document.addEventListener('DOMContentLoaded',initInterDataCarousels);\n  }else{\n    initInterDataCarousels();\n  }\n})();\n<\/script>\n\n\t<div id=\"gap-2002138659\" class=\"gap-element clearfix\" style=\"display:block; height:auto;\">\n\t\t\n<style>\n#gap-2002138659 {\n  padding-top: 30px;\n}\n<\/style>\n\t<\/div>\n\t\n<p style=\"text-align: justify;\"><span style=\"font-size: 100%;\"><strong>NGINX l\u00e0 g\u00ec<\/strong> m\u00e0 t\u1eeb trang l\u1ed7i 502 Bad Gateway \u0111\u1ebfn header response c\u1ee7a h\u00e0ng tri\u1ec7u website \u0111\u1ec1u th\u1ea5y t\u00ean n\u00f3? N\u1ebfu b\u1ea1n \u0111ang ph\u00e2n v\u00e2n ch\u1ecdn web server cho d\u1ef1 \u00e1n, ho\u1eb7c website ch\u1eadm d\u1ea7n khi l\u01b0\u1ee3ng truy c\u1eadp t\u0103ng, b\u00e0i vi\u1ebft n\u00e0y c\u1ee7a <a style=\"background: linear-gradient(90deg, #1E3A8A 0%, #2563EB 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-decoration: none; font-weight: bold;\" href=\"\/\">InterData<\/a> s\u1ebd gi\u1ea3i th\u00edch r\u00f5 NGINX ho\u1ea1t \u0111\u1ed9ng ra sao, d\u00f9ng \u0111\u1ec3 l\u00e0m g\u00ec v\u00e0 khi n\u00e0o n\u00ean ch\u1ecdn n\u00f3 thay v\u00ec Apache.<br \/>\n<\/span><\/p>\n<div style=\"background-color: #eff6ff; padding: 20px; border: 1.5px solid #BFDBFE; border-radius: 12px; margin-bottom: 40px; box-shadow: 0 8px 20px rgba(37, 99, 235, 0.05);\">\n<p style=\"font-family: 'Be Vietnam Pro', sans-serif; font-weight: bold; font-size: 18px; margin-top: 0; margin-bottom: 15px; color: #1e3a8a;\">N\u1ed8I DUNG B\u00c0I VI\u1ebeT<\/p>\n<ul style=\"list-style-type: none; padding-left: 0; margin: 0;\">\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section1\">NGINX l\u00e0 g\u00ec?<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section2\">NGINX ho\u1ea1t \u0111\u1ed9ng nh\u01b0 th\u1ebf n\u00e0o?<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section3\">NGINX d\u00f9ng \u0111\u1ec3 l\u00e0m g\u00ec? 5 vai tr\u00f2 ch\u00ednh trong h\u1ec7 th\u1ed1ng th\u1eadt<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section4\">So s\u00e1nh NGINX vs Apache: Ch\u1ecdn web server n\u00e0o?<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section5\">C\u00e1ch c\u00e0i \u0111\u1eb7t NGINX c\u01a1 b\u1ea3n tr\u00ean Ubuntu v\u00e0 CentOS<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section6\">Hi\u1ec3u NGINX l\u00e0 g\u00ec r\u1ed3i, n\u00ean ch\u1ea1y n\u00f3 tr\u00ean h\u1ea1 t\u1ea7ng n\u00e0o?<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section7\">FAQ: Gi\u1ea3i \u0111\u00e1p nhanh c\u00e1c th\u1eafc m\u1eafc khi t\u00ecm hi\u1ec3u NGINX l\u00e0 g\u00ec<\/a><\/li>\n<\/ul>\n<\/div>\n<h2 id=\"section1\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin-top: 40px; margin-bottom: 20px; line-height: 1.4;\">NGINX l\u00e0 g\u00ec?<\/h2>\n<p style=\"text-align: justify;\"><strong>NGINX<\/strong> l\u00e0 ph\u1ea7n m\u1ec1m web server m\u00e3 ngu\u1ed3n m\u1edf, hi\u1ec7u n\u0103ng cao, ho\u1ea1t \u0111\u1ed9ng theo ki\u1ebfn tr\u00fac event-driven b\u1ea5t \u0111\u1ed3ng b\u1ed9. Ngo\u00e0i vi\u1ec7c ph\u1ee5c v\u1ee5 n\u1ed9i dung web, NGINX c\u00f2n \u0111\u01b0\u1ee3c d\u00f9ng l\u00e0m reverse proxy, load balancer, SSL termination v\u00e0 HTTP cache, cho ph\u00e9p m\u1ed9t server x\u1eed l\u00fd h\u00e0ng ch\u1ee5c ngh\u00ecn k\u1ebft n\u1ed1i \u0111\u1ed3ng th\u1eddi v\u1edbi l\u01b0\u1ee3ng RAM th\u1ea5p.<\/p>\n<p style=\"text-align: justify;\">NGINX (\u0111\u1ecdc l\u00e0 &#8220;engine-x&#8221;) do k\u1ef9 s\u01b0 ng\u01b0\u1eddi Nga Igor Sysoev vi\u1ebft, ph\u00e1t h\u00e0nh b\u1ea3n \u0111\u1ea7u ti\u00ean v\u00e0o th\u00e1ng 10 n\u0103m 2004. \u00d4ng t\u1ea1o ra n\u00f3 \u0111\u1ec3 gi\u1ea3i b\u00e0i to\u00e1n C10K: l\u00e0m sao cho m\u1ed9t m\u00e1y ch\u1ee7 ph\u1ee5c v\u1ee5 \u0111\u01b0\u1ee3c 10.000 k\u1ebft n\u1ed1i c\u00f9ng l\u00fac, \u0111i\u1ec1u m\u00e0 m\u00f4 h\u00ecnh web server truy\u1ec1n th\u1ed1ng th\u1eddi \u0111\u00f3 x\u1eed l\u00fd r\u1ea5t t\u1ed1n t\u00e0i nguy\u00ean.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16385\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2024\/08\/nginx.webp\" alt=\"NGINX\" width=\"700\" height=\"392\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2024\/08\/nginx.webp 900w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2024\/08\/nginx-300x168.webp 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2024\/08\/nginx-768x430.webp 768w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2024\/08\/nginx-750x420.webp 750w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p style=\"text-align: justify;\">N\u0103m 2011, Igor Sysoev th\u00e0nh l\u1eadp c\u00f4ng ty NGINX Inc. \u0111\u1ec3 ph\u00e1t tri\u1ec3n b\u1ea3n th\u01b0\u01a1ng m\u1ea1i NGINX Plus. \u0110\u1ebfn n\u0103m 2019, F5 Networks mua l\u1ea1i NGINX Inc., v\u00e0 hi\u1ec7n F5 v\u1eabn duy tr\u00ec song song b\u1ea3n m\u00e3 ngu\u1ed3n m\u1edf mi\u1ec5n ph\u00ed l\u1eabn b\u1ea3n tr\u1ea3 ph\u00ed.<\/p>\n<p style=\"text-align: justify;\">N\u00f3i c\u00e1ch kh\u00e1c, khi ai \u0111\u00f3 nh\u1eafc \u0111\u1ebfn &#8220;NGINX server&#8221;, h\u1ecd \u0111ang n\u00f3i v\u1ec1 m\u1ed9t trong nh\u1eefng web server \u0111\u01b0\u1ee3c tri\u1ec3n khai nhi\u1ec1u nh\u1ea5t th\u1ebf gi\u1edbi hi\u1ec7n nay, \u0111\u1ee9ng sau v\u00f4 s\u1ed1 website t\u1eeb blog c\u00e1 nh\u00e2n \u0111\u1ebfn h\u1ec7 th\u1ed1ng l\u1edbn nh\u01b0 Netflix hay Cloudflare (Cloudflare t\u1eebng d\u00f9ng NGINX l\u00e0m n\u1ec1n t\u1ea3ng proxy trong nhi\u1ec1u n\u0103m). N\u1ebfu b\u1ea1n ch\u01b0a v\u1eefng kh\u00e1i ni\u1ec7m n\u1ec1n t\u1ea3ng, n\u00ean \u0111\u1ecdc tr\u01b0\u1edbc b\u00e0i <a href=\"https:\/\/interdata.vn\/blog\/web-server\/\">web server l\u00e0 g\u00ec<\/a> \u0111\u1ec3 hi\u1ec3u v\u1ecb tr\u00ed c\u1ee7a NGINX trong lu\u1ed3ng ho\u1ea1t \u0111\u1ed9ng c\u1ee7a m\u1ed9t website.<\/p>\n<h2 id=\"section2\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin-top: 40px; margin-bottom: 20px; line-height: 1.4;\">NGINX ho\u1ea1t \u0111\u1ed9ng nh\u01b0 th\u1ebf n\u00e0o?<\/h2>\n<p style=\"text-align: justify;\">NGINX ho\u1ea1t \u0111\u1ed9ng theo m\u00f4 h\u00ecnh master\u2013worker k\u1ebft h\u1ee3p ki\u1ebfn tr\u00fac event-driven b\u1ea5t \u0111\u1ed3ng b\u1ed9. Master process \u0111\u1ecdc file c\u1ea5u h\u00ecnh nginx.conf v\u00e0 qu\u1ea3n l\u00fd c\u00e1c worker process. M\u1ed7i worker ch\u1ea1y m\u1ed9t v\u00f2ng l\u1eb7p s\u1ef1 ki\u1ec7n non-blocking, nh\u1edd \u0111\u00f3 m\u1ed9t worker duy nh\u1ea5t x\u1eed l\u00fd \u0111\u01b0\u1ee3c h\u00e0ng ngh\u00ecn k\u1ebft n\u1ed1i c\u00f9ng l\u00fac thay v\u00ec m\u1ed7i k\u1ebft n\u1ed1i chi\u1ebfm m\u1ed9t ti\u1ebfn tr\u00ecnh ri\u00eang.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-42666\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2024\/09\/So-do-nguyen-ly-hoat-dong-cua-NGINX.jpg\" alt=\"S\u01a1 \u0111\u1ed3 nguy\u00ean l\u00fd ho\u1ea1t \u0111\u1ed9ng c\u1ee7a NGINX\" width=\"700\" height=\"467\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2024\/09\/So-do-nguyen-ly-hoat-dong-cua-NGINX.jpg 700w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2024\/09\/So-do-nguyen-ly-hoat-dong-cua-NGINX-300x200.jpg 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: bold; margin-top: 30px; margin-bottom: 15px;\">Master process v\u00e0 worker process<\/h3>\n<p style=\"text-align: justify;\">Khi b\u1ea1n kh\u1edfi \u0111\u1ed9ng NGINX, c\u00f3 \u0111\u00fang m\u1ed9t master process ch\u1ea1y v\u1edbi quy\u1ec1n root. N\u00f3 kh\u00f4ng x\u1eed l\u00fd request n\u00e0o c\u1ea3. Nhi\u1ec7m v\u1ee5 c\u1ee7a n\u00f3 l\u00e0 \u0111\u1ecdc v\u00e0 ki\u1ec3m tra c\u1ea5u h\u00ecnh, m\u1edf port, r\u1ed3i sinh ra c\u00e1c worker process ch\u1ea1y v\u1edbi quy\u1ec1n h\u1ea1n th\u1ea5p h\u01a1n.<\/p>\n<p style=\"text-align: justify;\">Worker m\u1edbi l\u00e0 n\u01a1i x\u1eed l\u00fd request th\u1eadt. S\u1ed1 l\u01b0\u1ee3ng worker th\u01b0\u1eddng \u0111\u01b0\u1ee3c \u0111\u1eb7t b\u1eb1ng s\u1ed1 nh\u00e2n CPU qua ch\u1ec9 th\u1ecb <code>worker_processes auto;<\/code> trong nginx.conf. M\u1ed7i worker l\u1ea1i nh\u1eadn t\u1ed1i \u0111a s\u1ed1 k\u1ebft n\u1ed1i theo <code>worker_connections<\/code>, m\u1eb7c \u0111\u1ecbnh th\u01b0\u1eddng l\u00e0 768 ho\u1eb7c 1024 t\u00f9y b\u1ea3n \u0111\u00f3ng g\u00f3i.<\/p>\n<p style=\"text-align: justify;\">Thi\u1ebft k\u1ebf n\u00e0y c\u00f3 m\u1ed9t h\u1ec7 qu\u1ea3 r\u1ea5t th\u1ef1c d\u1ee5ng: b\u1ea1n reload c\u1ea5u h\u00ecnh m\u00e0 kh\u00f4ng r\u1edbt k\u1ebft n\u1ed1i n\u00e0o. Master sinh worker m\u1edbi v\u1edbi c\u1ea5u h\u00ecnh m\u1edbi, worker c\u0169 x\u1eed l\u00fd n\u1ed1t request \u0111ang d\u1edf r\u1ed3i t\u1ef1 tho\u00e1t. \u0110\u00e2y l\u00e0 l\u00fd do l\u1ec7nh <code>nginx -s reload<\/code> an to\u00e0n \u0111\u1ec3 ch\u1ea1y tr\u00ean h\u1ec7 th\u1ed1ng production \u0111ang c\u00f3 ng\u01b0\u1eddi d\u00f9ng.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: bold; margin-top: 30px; margin-bottom: 15px;\">V\u00ec sao ki\u1ebfn tr\u00fac event-driven ti\u1ebft ki\u1ec7m t\u00e0i nguy\u00ean?<\/h3>\n<p style=\"text-align: justify;\">M\u00f4 h\u00ecnh c\u0169 ki\u1ec3u Apache MPM prefork c\u1ea5p m\u1ed9t ti\u1ebfn tr\u00ecnh cho m\u1ed7i k\u1ebft n\u1ed1i. 1.000 ng\u01b0\u1eddi truy c\u1eadp \u0111\u1ed3ng th\u1eddi ngh\u0129a l\u00e0 1.000 ti\u1ebfn tr\u00ecnh, m\u1ed7i ti\u1ebfn tr\u00ecnh ng\u1ed1n v\u00e0i MB RAM d\u00f9 ph\u1ea7n l\u1edbn th\u1eddi gian ch\u1ec9 ng\u1ed3i ch\u1edd d\u1eef li\u1ec7u t\u1eeb m\u1ea1ng ho\u1eb7c \u1ed5 \u0111\u0129a.<\/p>\n<p style=\"text-align: justify;\">NGINX l\u00e0m ng\u01b0\u1ee3c l\u1ea1i. Worker kh\u00f4ng ch\u1edd. N\u00f3 d\u00f9ng c\u01a1 ch\u1ebf th\u00f4ng b\u00e1o s\u1ef1 ki\u1ec7n c\u1ee7a h\u1ec7 \u0111i\u1ec1u h\u00e0nh (epoll tr\u00ean Linux, kqueue tr\u00ean FreeBSD) \u0111\u1ec3 bi\u1ebft k\u1ebft n\u1ed1i n\u00e0o \u0111ang s\u1eb5n s\u00e0ng \u0111\u1ecdc\/ghi, r\u1ed3i x\u1eed l\u00fd l\u1ea7n l\u01b0\u1ee3t trong m\u1ed9t v\u00f2ng l\u1eb7p. K\u1ebft n\u1ed1i \u0111ang ch\u1edd d\u1eef li\u1ec7u g\u1ea7n nh\u01b0 kh\u00f4ng t\u1ed1n g\u00ec ngo\u00e0i m\u1ed9t \u00edt b\u1ed9 nh\u1edb tr\u1ea1ng th\u00e1i.<\/p>\n<p style=\"text-align: justify;\">K\u1ebft qu\u1ea3: c\u00f9ng m\u1ed9t VPS 1-2 GB RAM, NGINX gi\u1eef \u0111\u01b0\u1ee3c s\u1ed1 k\u1ebft n\u1ed1i \u0111\u1ed3ng th\u1eddi l\u1edbn h\u01a1n nhi\u1ec1u so v\u1edbi m\u00f4 h\u00ecnh process-per-connection. \u0110\u00f3 ch\u00ednh l\u00e0 l\u1eddi gi\u1ea3i cho b\u00e0i to\u00e1n C10K m\u00e0 Igor Sysoev nh\u1eafm t\u1edbi t\u1eeb \u0111\u1ea7u.<\/p>\n<h2 id=\"section3\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin-top: 40px; margin-bottom: 20px; line-height: 1.4;\">NGINX d\u00f9ng \u0111\u1ec3 l\u00e0m g\u00ec? 5 vai tr\u00f2 ch\u00ednh trong h\u1ec7 th\u1ed1ng th\u1eadt<\/h2>\n<p style=\"text-align: justify;\">NGINX d\u00f9ng \u0111\u1ec3 l\u00e0m 5 vi\u1ec7c ch\u00ednh: ph\u1ee5c v\u1ee5 n\u1ed9i dung t\u0129nh v\u1edbi vai tr\u00f2 web server, l\u00e0m reverse proxy \u0111\u1ee9ng tr\u01b0\u1edbc backend, c\u00e2n b\u1eb1ng t\u1ea3i gi\u1eefa nhi\u1ec1u server, k\u1ebft th\u00fac k\u1ebft n\u1ed1i SSL\/TLS (SSL termination) v\u00e0 cache n\u1ed9i dung \u0111\u1ec3 gi\u1ea3m t\u1ea3i. M\u1ed9t b\u1ea3n c\u00e0i NGINX duy nh\u1ea5t c\u00f3 th\u1ec3 \u0111\u1ea3m nh\u1eadn \u0111\u1ed3ng th\u1eddi nhi\u1ec1u vai tr\u00f2 n\u00e0y.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-42664\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2024\/09\/NGINX-dung-de-lam-gi.jpg\" alt=\"NGINX d\u00f9ng \u0111\u1ec3 l\u00e0m g\u00ec\" width=\"700\" height=\"467\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2024\/09\/NGINX-dung-de-lam-gi.jpg 700w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2024\/09\/NGINX-dung-de-lam-gi-300x200.jpg 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: bold; margin-top: 30px; margin-bottom: 15px;\">Web server ph\u1ee5c v\u1ee5 n\u1ed9i dung t\u0129nh<\/h3>\n<p style=\"text-align: justify;\">\u0110\u00e2y l\u00e0 vai tr\u00f2 g\u1ed1c c\u1ee7a NGINX server: nh\u1eadn request HTTP v\u00e0 tr\u1ea3 v\u1ec1 file HTML, CSS, JavaScript, \u1ea3nh, video. V\u1edbi n\u1ed9i dung t\u0129nh, NGINX g\u1ea7n nh\u01b0 ch\u1ec9 \u0111\u1ecdc file t\u1eeb \u0111\u0129a v\u00e0 \u0111\u1ea9y ra m\u1ea1ng, t\u1eadn d\u1ee5ng c\u1ea3 c\u01a1 ch\u1ebf sendfile c\u1ee7a kernel n\u00ean t\u1ed1c \u0111\u1ed9 r\u1ea5t cao v\u00e0 CPU g\u1ea7n nh\u01b0 r\u1ea3nh.<\/p>\n<p style=\"text-align: justify;\">Trong th\u1ef1c t\u1ebf tri\u1ec3n khai, c\u00e1c site landing page, t\u00e0i li\u1ec7u t\u0129nh, website build s\u1eb5n b\u1eb1ng Next.js export ho\u1eb7c Hugo th\u01b0\u1eddng ch\u1ec9 c\u1ea7n m\u1ed9t block <code>server<\/code> v\u00e0i d\u00f2ng trong nginx.conf l\u00e0 ch\u1ea1y.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: bold; margin-top: 30px; margin-bottom: 15px;\">Reverse proxy: NGINX \u0111\u1ee9ng tr\u01b0\u1edbc backend nh\u01b0 th\u1ebf n\u00e0o?<\/h3>\n<p style=\"text-align: justify;\">\u0110\u00e2y l\u00e0 vai tr\u00f2 khi\u1ebfn b\u1ea1n hay g\u1eb7p t\u00ean NGINX nh\u1ea5t. NGINX kh\u00f4ng t\u1ef1 ch\u1ea1y code PHP, Python hay Node.js. N\u00f3 nh\u1eadn request t\u1eeb tr\u00ecnh duy\u1ec7t r\u1ed3i chuy\u1ec3n ti\u1ebfp \u0111\u1ebfn backend x\u1eed l\u00fd \u0111\u1ed9ng: PHP-FPM cho WordPress\/Laravel, m\u1ed9t ti\u1ebfn tr\u00ecnh Node.js, Gunicorn cho Python. Lu\u1ed3ng \u0111i nh\u01b0 sau:<\/p>\n<p style=\"text-align: justify;\"><strong>Client \u2192 NGINX (reverse proxy) \u2192 NGINX backend pool (PHP-FPM, Node.js, API&#8230;) \u2192 NGINX \u2192 Client<\/strong><\/p>\n<p style=\"text-align: justify;\">C\u1ea5u h\u00ecnh chuy\u1ec3n ti\u1ebfp \u0111\u1ebfn backend d\u00f9ng kh\u1ed1i <code>upstream<\/code> v\u00e0 ch\u1ec9 th\u1ecb <code>proxy_pass<\/code>:<\/p>\n<pre>upstream backend_app {\r\n    server 127.0.0.1:3000;\r\n    server 127.0.0.1:3001;\r\n}\r\n\r\nserver {\r\n    listen 80;\r\n    server_name example.com;\r\n\r\n    location \/ {\r\n        proxy_pass http:\/\/backend_app;\r\n        proxy_set_header Host $host;\r\n        proxy_set_header X-Real-IP $remote_addr;\r\n    }\r\n}<\/pre>\n<p style=\"text-align: justify;\">C\u00e1ch b\u1ed1 tr\u00ed n\u00e0y gi\u1ea3i th\u00edch lu\u00f4n m\u1ed9t hi\u1ec7n t\u01b0\u1ee3ng quen thu\u1ed9c: khi backend ch\u1ebft, treo ho\u1eb7c ph\u1ea3n h\u1ed3i sai, NGINX v\u1eabn s\u1ed1ng v\u00e0 tr\u1ea3 v\u1ec1 trang l\u1ed7i mang t\u00ean n\u00f3. N\u1ebfu b\u1ea1n t\u1eebng th\u1ea5y m\u00e0n h\u00ecnh tr\u1eafng ghi &#8220;502 Bad Gateway \u2013 nginx&#8221;, h\u00e3y \u0111\u1ecdc b\u00e0i ph\u00e2n t\u00edch <a href=\"https:\/\/interdata.vn\/blog\/loi-502-bad-gateway-la-gi\/\">l\u1ed7i 502 Bad Gateway<\/a> \u0111\u1ec3 bi\u1ebft c\u00e1ch khoanh v\u00f9ng nguy\u00ean nh\u00e2n gi\u1eefa NGINX v\u00e0 backend.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: bold; margin-top: 30px; margin-bottom: 15px;\">Load balancer: chia t\u1ea3i cho nhi\u1ec1u server<\/h3>\n<p style=\"text-align: justify;\">Khi m\u1ed9t backend kh\u00f4ng g\u00e1nh n\u1ed5i l\u01b0\u1ee3ng truy c\u1eadp, b\u1ea1n th\u00eam server v\u00e0 \u0111\u1ec3 NGINX chia request. Kh\u1ed1i <code>upstream<\/code> \u1edf tr\u00ean ch\u00ednh l\u00e0 m\u1ed9t load balancer t\u1ed1i gi\u1ea3n: m\u1eb7c \u0111\u1ecbnh NGINX xoay v\u00f2ng round-robin gi\u1eefa c\u00e1c server, ngo\u00e0i ra c\u00f2n c\u00f3 <code>least_conn<\/code> (\u01b0u ti\u00ean server \u00edt k\u1ebft n\u1ed1i nh\u1ea5t) v\u00e0 <code>ip_hash<\/code> (gi\u1eef m\u1ed9t client b\u00e1m m\u1ed9t server, c\u1ea7n cho session).<\/p>\n<p style=\"text-align: justify;\">\u0110\u1ec3 hi\u1ec3u b\u1ee9c tranh r\u1ed9ng h\u01a1n v\u1ec1 c\u00e1c thu\u1eadt to\u00e1n ph\u00e2n ph\u1ed1i v\u00e0 health check, b\u1ea1n n\u00ean \u0111\u1ecdc b\u00e0i v\u1ec1 <a href=\"https:\/\/interdata.vn\/blog\/load-balancing\/\">k\u1ef9 thu\u1eadt load balancing<\/a>. C\u00f2n n\u1ebfu h\u1ec7 th\u1ed1ng thi\u00ean v\u1ec1 TCP\/Layer 4 ho\u1eb7c c\u1ea7n t\u00ednh n\u0103ng c\u00e2n b\u1eb1ng t\u1ea3i chuy\u00ean s\u00e2u, so s\u00e1nh th\u00eam v\u1edbi <a href=\"https:\/\/interdata.vn\/blog\/haproxy-la-gi\/\">HAProxy<\/a>\u00a0tr\u01b0\u1edbc khi ch\u1ed1t c\u00f4ng c\u1ee5.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: bold; margin-top: 30px; margin-bottom: 15px;\">SSL termination: g\u00e1nh ph\u1ea7n m\u00e3 h\u00f3a HTTPS<\/h3>\n<p style=\"text-align: justify;\">Thay v\u00ec \u0111\u1ec3 t\u1eebng backend t\u1ef1 x\u1eed l\u00fd m\u00e3 h\u00f3a, NGINX nh\u1eadn k\u1ebft n\u1ed1i HTTPS t\u1eeb client, gi\u1ea3i m\u00e3 t\u1ea1i ch\u1ed7 r\u1ed3i chuy\u1ec3n request d\u1ea1ng HTTP th\u01b0\u1eddng v\u00e0o m\u1ea1ng n\u1ed9i b\u1ed9. Backend nh\u1eb9 \u0111i, ch\u1ee9ng ch\u1ec9 SSL qu\u1ea3n l\u00fd t\u1eadp trung m\u1ed9t ch\u1ed7, v\u00e0 b\u1ea1n b\u1eadt \u0111\u01b0\u1ee3c HTTP\/2 ch\u1ec9 v\u1edbi <code>listen 443 ssl http2;<\/code>.<\/p>\n<p style=\"text-align: justify;\">N\u1ebfu ch\u01b0a r\u00f5 v\u00ec sao m\u1ecdi website hi\u1ec7n nay \u0111\u1ec1u c\u1ea7n \u1ed5 kh\u00f3a tr\u00ean tr\u00ecnh duy\u1ec7t, b\u00e0i vi\u1ebft v\u1ec1 <a href=\"https:\/\/interdata.vn\/blog\/giao-thuc-https-la-gi\/\">giao th\u1ee9c HTTPS<\/a> gi\u1ea3i th\u00edch chi ti\u1ebft c\u01a1 ch\u1ebf m\u00e3 h\u00f3a v\u00e0 vai tr\u00f2 c\u1ee7a ch\u1ee9ng ch\u1ec9 SSL.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: bold; margin-top: 30px; margin-bottom: 15px;\">Caching v\u00e0 n\u00e9n: gi\u1ea3m t\u1ea3i cho backend<\/h3>\n<p style=\"text-align: justify;\">NGINX cache \u0111\u01b0\u1ee3c response t\u1eeb backend b\u1eb1ng <code>proxy_cache<\/code>: request l\u1eb7p l\u1ea1i s\u1ebd \u0111\u01b0\u1ee3c tr\u1ea3 th\u1eb3ng t\u1eeb cache thay v\u00ec g\u1ecdi xu\u1ed1ng PHP-FPM hay Node.js l\u1ea7n n\u1eefa. K\u1ebft h\u1ee3p n\u00e9n gzip (ho\u1eb7c Brotli qua module), dung l\u01b0\u1ee3ng truy\u1ec1n t\u1ea3i gi\u1ea3m m\u1ea1nh v\u1edbi n\u1ed9i dung v\u0103n b\u1ea3n.<\/p>\n<p style=\"text-align: justify;\">V\u1edbi website WordPress c\u00f3 l\u01b0\u1ee3ng \u0111\u1ecdc l\u1edbn nh\u01b0ng \u00edt thay \u0111\u1ed5i, b\u1eadt proxy_cache ho\u1eb7c fastcgi_cache \u0111\u00fang c\u00e1ch th\u01b0\u1eddng l\u00e0 thay \u0111\u1ed5i mang l\u1ea1i kh\u00e1c bi\u1ec7t t\u1ed1c \u0111\u1ed9 r\u00f5 nh\u1ea5t m\u00e0 kh\u00f4ng t\u1ed1n th\u00eam ph\u1ea7n c\u1ee9ng.<\/p>\n<h2 id=\"section4\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin-top: 40px; margin-bottom: 20px; line-height: 1.4;\">So s\u00e1nh NGINX vs Apache: Ch\u1ecdn web server n\u00e0o?<\/h2>\n<p style=\"text-align: justify;\">NGINX th\u1eafng \u1edf hi\u1ec7u n\u0103ng n\u1ed9i dung t\u0129nh, s\u1ed1 k\u1ebft n\u1ed1i \u0111\u1ed3ng th\u1eddi l\u1edbn v\u00e0 vai tr\u00f2 reverse proxy; Apache th\u1eafng \u1edf h\u1ec7 sinh th\u00e1i module l\u00e2u \u0111\u1eddi v\u00e0 c\u1ea5u h\u00ecnh ph\u00e2n t\u00e1n qua .htaccess. Ch\u1ecdn NGINX khi b\u1ea1n ki\u1ec3m so\u00e1t to\u00e0n b\u1ed9 server v\u00e0 \u01b0u ti\u00ean hi\u1ec7u n\u0103ng; ch\u1ecdn Apache khi ph\u1ee5 thu\u1ed9c .htaccess ho\u1eb7c hosting \u0111\u00e3 c\u1ea5u h\u00ecnh s\u1eb5n.<\/p>\n<p style=\"text-align: justify;\">Tr\u01b0\u1edbc khi xem b\u1ea3ng, n\u1ebfu b\u1ea1n ch\u01b0a n\u1eafm r\u00f5 \u0111\u1ed1i th\u1ee7 l\u00e2u \u0111\u1eddi nh\u1ea5t c\u1ee7a NGINX, h\u00e3y \u0111\u1ecdc b\u00e0i <a href=\"https:\/\/interdata.vn\/blog\/apache-la-gi\/\">Apache l\u00e0 g\u00ec<\/a> \u0111\u1ec3 c\u00f3 n\u1ec1n so s\u00e1nh c\u00f4ng b\u1eb1ng.<\/p>\n<table style=\"width: 100%; border-collapse: collapse; margin: 25px 0; font-size: 15px;\">\n<thead>\n<tr style=\"background: linear-gradient(90deg, #1E3A8A 0%, #2563EB 100%); color: #ffffff;\">\n<th style=\"padding: 12px 15px; text-align: left; border: 1px solid #BFDBFE;\">Ti\u00eau ch\u00ed<\/th>\n<th style=\"padding: 12px 15px; text-align: left; border: 1px solid #BFDBFE;\">NGINX<\/th>\n<th style=\"padding: 12px 15px; text-align: left; border: 1px solid #BFDBFE;\">Apache<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding: 12px 15px; border: 1px solid #BFDBFE;\"><strong>Ki\u1ebfn tr\u00fac x\u1eed l\u00fd<\/strong><\/td>\n<td style=\"padding: 12px 15px; border: 1px solid #BFDBFE;\">Event-driven b\u1ea5t \u0111\u1ed3ng b\u1ed9, master + worker process<\/td>\n<td style=\"padding: 12px 15px; border: 1px solid #BFDBFE;\">Process\/thread theo MPM (prefork, worker, event)<\/td>\n<\/tr>\n<tr style=\"background-color: #eff6ff;\">\n<td style=\"padding: 12px 15px; border: 1px solid #BFDBFE;\"><strong>N\u1ed9i dung t\u0129nh<\/strong><\/td>\n<td style=\"padding: 12px 15px; border: 1px solid #BFDBFE;\">R\u1ea5t nhanh, ti\u00eau th\u1ee5 RAM th\u1ea5p khi k\u1ebft n\u1ed1i l\u1edbn<\/td>\n<td style=\"padding: 12px 15px; border: 1px solid #BFDBFE;\">\u1ed4n v\u1edbi t\u1ea3i v\u1eeba, t\u1ed1n RAM h\u01a1n khi k\u1ebft n\u1ed1i t\u0103ng cao<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px 15px; border: 1px solid #BFDBFE;\"><strong>C\u1ea5u h\u00ecnh th\u01b0 m\u1ee5c<\/strong><\/td>\n<td style=\"padding: 12px 15px; border: 1px solid #BFDBFE;\">Kh\u00f4ng h\u1ed7 tr\u1ee3 .htaccess, c\u1ea5u h\u00ecnh t\u1eadp trung trong nginx.conf<\/td>\n<td style=\"padding: 12px 15px; border: 1px solid #BFDBFE;\">H\u1ed7 tr\u1ee3 .htaccess, \u0111\u1ed5i c\u1ea5u h\u00ecnh theo t\u1eebng th\u01b0 m\u1ee5c kh\u00f4ng c\u1ea7n quy\u1ec1n root<\/td>\n<\/tr>\n<tr style=\"background-color: #eff6ff;\">\n<td style=\"padding: 12px 15px; border: 1px solid #BFDBFE;\"><strong>X\u1eed l\u00fd n\u1ed9i dung \u0111\u1ed9ng<\/strong><\/td>\n<td style=\"padding: 12px 15px; border: 1px solid #BFDBFE;\">Kh\u00f4ng nh\u00fang tr\u00ecnh th\u00f4ng d\u1ecbch, \u0111\u1ea9y sang backend qua FastCGI\/proxy<\/td>\n<td style=\"padding: 12px 15px; border: 1px solid #BFDBFE;\">Nh\u00fang \u0111\u01b0\u1ee3c module nh\u01b0 mod_php, ch\u1ea1y PHP ngay trong ti\u1ebfn tr\u00ecnh<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px 15px; border: 1px solid #BFDBFE;\"><strong>Reverse proxy \/ load balancing<\/strong><\/td>\n<td style=\"padding: 12px 15px; border: 1px solid #BFDBFE;\">L\u00e0 th\u1ebf m\u1ea1nh c\u1ed1t l\u00f5i, c\u1ea5u h\u00ecnh g\u1ecdn<\/td>\n<td style=\"padding: 12px 15px; border: 1px solid #BFDBFE;\">L\u00e0m \u0111\u01b0\u1ee3c qua mod_proxy nh\u01b0ng \u00edt \u0111\u01b0\u1ee3c ch\u1ecdn cho vai tr\u00f2 n\u00e0y<\/td>\n<\/tr>\n<tr style=\"background-color: #eff6ff;\">\n<td style=\"padding: 12px 15px; border: 1px solid #BFDBFE;\"><strong>Ph\u00f9 h\u1ee3p khi<\/strong><\/td>\n<td style=\"padding: 12px 15px; border: 1px solid #BFDBFE;\">VPS\/Cloud t\u1ef1 qu\u1ea3n, traffic cao, l\u00e0m proxy cho \u1ee9ng d\u1ee5ng<\/td>\n<td style=\"padding: 12px 15px; border: 1px solid #BFDBFE;\">Hosting c\u1ea5u h\u00ecnh s\u1eb5n, \u1ee9ng d\u1ee5ng ph\u1ee5 thu\u1ed9c .htaccess<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\">Quan \u0111i\u1ec3m c\u1ee7a ng\u01b0\u1eddi \u0111\u00e3 v\u1eadn h\u00e0nh c\u1ea3 hai: n\u1ebfu b\u1ea1n thu\u00ea VPS v\u00e0 t\u1ef1 d\u1ef1ng t\u1eeb \u0111\u1ea7u, h\u00e3y ch\u1ecdn NGINX l\u00e0m m\u1eb7c \u0111\u1ecbnh. Ch\u1ec9 gi\u1eef Apache khi \u1ee9ng d\u1ee5ng c\u1ee7a b\u1ea1n ph\u1ee5 thu\u1ed9c n\u1eb7ng v\u00e0o .htaccess m\u00e0 b\u1ea1n kh\u00f4ng mu\u1ed1n vi\u1ebft l\u1ea1i rule, ho\u1eb7c khi \u0111\u1ed9i ng\u0169 \u0111\u00e3 quen qu\u1ea3n tr\u1ecb Apache. Hai ph\u1ea7n m\u1ec1m n\u00e0y c\u0169ng hay \u0111\u01b0\u1ee3c d\u00f9ng chung: NGINX \u0111\u1ee9ng tr\u01b0\u1edbc l\u00e0m proxy, Apache ph\u00eda sau ch\u1ea1y PHP.<\/p>\n<p style=\"text-align: justify;\">Th\u1ecb tr\u01b0\u1eddng kh\u00f4ng ch\u1ec9 c\u00f3 hai c\u00e1i t\u00ean n\u00e0y. Trong nh\u00f3m web server th\u01b0\u01a1ng m\u1ea1i, <a href=\"https:\/\/interdata.vn\/blog\/litespeed-la-gi\/\">LiteSpeed Web Server<\/a> n\u1ed5i b\u1eadt nh\u1edd t\u01b0\u01a1ng th\u00edch .htaccess nh\u01b0 Apache nh\u01b0ng d\u00f9ng ki\u1ebfn tr\u00fac event-driven nh\u01b0 NGINX, k\u00e8m plugin cache ri\u00eang cho WordPress.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-42667\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2024\/09\/So-sanh-NGINX-va-Apache.jpg\" alt=\"So s\u00e1nh NGINX v\u00e0 Apache\" width=\"700\" height=\"292\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2024\/09\/So-sanh-NGINX-va-Apache.jpg 700w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2024\/09\/So-sanh-NGINX-va-Apache-300x125.jpg 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<h2 id=\"section5\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin-top: 40px; margin-bottom: 20px; line-height: 1.4;\">C\u00e1ch c\u00e0i \u0111\u1eb7t NGINX c\u01a1 b\u1ea3n tr\u00ean Ubuntu v\u00e0 CentOS<\/h2>\n<p style=\"text-align: justify;\">C\u00e0i \u0111\u1eb7t NGINX t\u1eeb kho ph\u1ea7n m\u1ec1m h\u1ec7 \u0111i\u1ec1u h\u00e0nh ch\u1ec9 m\u1ea5t v\u00e0i ph\u00fat. \u0110i\u1ec1u ki\u1ec7n ti\u00ean quy\u1ebft: b\u1ea1n ph\u1ea3i c\u00f3 quy\u1ec1n root ho\u1eb7c sudo tr\u00ean server. \u0110\u00e2y l\u00e0 l\u00fd do shared hosting ph\u00f9 h\u1ee3p giai \u0111o\u1ea1n nh\u1ecf, c\u00f2n khi mu\u1ed1n t\u1ef1 c\u00e0i v\u00e0 l\u00e0m ch\u1ee7 web server, b\u1ea1n c\u1ea7n chuy\u1ec3n l\u00ean VPS.<\/p>\n<p style=\"text-align: justify;\">Tr\u00ean Ubuntu\/Debian:<\/p>\n<pre># Ubuntu \/ Debian\r\nsudo apt update\r\nsudo apt install nginx<\/pre>\n<p style=\"text-align: justify;\">Tr\u00ean CentOS\/RHEL\/AlmaLinux (b\u1ea3n c\u0169 d\u00f9ng yum thay cho dnf):<\/p>\n<pre># CentOS \/ RHEL \/ AlmaLinux\r\nsudo dnf install nginx\r\nsudo systemctl enable --now nginx<\/pre>\n<p style=\"text-align: justify;\">Ba l\u1ec7nh b\u1ea1n s\u1ebd d\u00f9ng th\u01b0\u1eddng xuy\u00ean nh\u1ea5t khi v\u1eadn h\u00e0nh:<\/p>\n<ol style=\"padding-left: 20px; margin-bottom: 25px; color: #1f2937;\">\n<li style=\"margin-bottom: 10px;\"><strong>Ki\u1ec3m tra tr\u1ea1ng th\u00e1i:<\/strong> <code>sudo systemctl status nginx<\/code> \u2014 x\u00e1c nh\u1eadn NGINX \u0111ang ch\u1ea1y v\u00e0 xem log g\u1ea7n nh\u1ea5t.<\/li>\n<li style=\"margin-bottom: 10px;\"><strong>Ki\u1ec3m tra c\u00fa ph\u00e1p c\u1ea5u h\u00ecnh:<\/strong> <code>sudo nginx -t<\/code> \u2014 lu\u00f4n ch\u1ea1y l\u1ec7nh n\u00e0y tr\u01b0\u1edbc khi reload, sai m\u1ed9t d\u1ea5u ch\u1ea5m ph\u1ea9y trong nginx.conf l\u00e0 NGINX t\u1eeb ch\u1ed1i n\u1ea1p c\u1ea5u h\u00ecnh.<\/li>\n<li style=\"margin-bottom: 10px;\"><strong>N\u1ea1p l\u1ea1i c\u1ea5u h\u00ecnh kh\u00f4ng downtime:<\/strong> <code>sudo systemctl reload nginx<\/code> \u2014 worker c\u0169 x\u1eed l\u00fd n\u1ed1t request \u0111ang d\u1edf r\u1ed3i m\u1edbi tho\u00e1t.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">C\u00e0i xong, m\u1edf tr\u00ecnh duy\u1ec7t g\u00f5 IP server ho\u1eb7c ch\u1ea1y <code>curl -I localhost<\/code>; th\u1ea5y d\u00f2ng &#8220;Welcome to nginx!&#8221; ho\u1eb7c header <code>Server: nginx<\/code> l\u00e0 th\u00e0nh c\u00f4ng. File c\u1ea5u h\u00ecnh ch\u00ednh n\u1eb1m \u1edf <code>\/etc\/nginx\/nginx.conf<\/code> (\u0111\u01b0\u1eddng d\u1eabn c\u00f3 th\u1ec3 kh\u00e1c n\u1ebfu b\u1ea1n build t\u1eeb source). T\u00e0i li\u1ec7u chu\u1ea9n v\u1ec1 m\u1ecdi ch\u1ec9 th\u1ecb c\u1ea5u h\u00ecnh n\u1eb1m t\u1ea1i <a href=\"https:\/\/nginx.org\/en\/docs\/\" target=\"_blank\" rel=\"noopener\">nginx.org\/en\/docs<\/a>.<\/p>\n<p style=\"text-align: justify;\">B\u00e0i n\u00e0y ch\u1ec9 \u0111i\u1ec3m qua ph\u1ea7n c\u00e0i \u0111\u1eb7t \u0111\u1ec3 b\u1ea1n h\u00ecnh dung m\u1ee9c \u0111\u1ed9 \u0111\u01a1n gi\u1ea3n. C\u00e1c b\u01b0\u1edbc \u0111\u1ea7y \u0111\u1ee7 g\u1ed3m m\u1edf firewall, t\u1ea1o server block cho domain v\u00e0 tr\u1ecf th\u01b0 m\u1ee5c web \u0111\u00e3 c\u00f3 trong b\u00e0i <a href=\"https:\/\/interdata.vn\/blog\/huong-dan-cai-dat-nginx-ubuntu-centos\/\">h\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t NGINX tr\u00ean Ubuntu\/CentOS<\/a>.<\/p>\n<div style=\"display: flex; flex-wrap: wrap; background-color: #fff; border: 1.5px solid #BFDBFE; box-shadow: 0 8px 20px rgba(37,99,235,0.08); border-radius: 12px; overflow: hidden; margin: 35px 0;\">\n<div style=\"flex: 1; min-width: 250px; background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%); display: flex; align-items: center; justify-content: center; padding: 30px; text-align: center;\">\n<div>\n<p style=\"color: white; font-size: 34px; font-family: 'Be Vietnam Pro', sans-serif; font-weight: bold; margin: 0; line-height: 1.1;\">Thu\u00ea VPS InterData<\/p>\n<p style=\"color: #dbeafe; font-size: 15px; font-weight: 600; margin-top: 12px;\">CPU th\u1ebf h\u1ec7 m\u1edbi \u00b7 SSD NVMe U.2 \u00b7 H\u1ed7 tr\u1ee3 k\u1ef9 thu\u1eadt 24\/7<\/p>\n<\/div>\n<\/div>\n<div style=\"flex: 2; padding: 25px; min-width: 300px;\">\n<h3 style=\"font-family: 'Be Vietnam Pro', sans-serif; color: #1e3a8a; margin-top: 0; font-size: 20px;\">C\u1ea7n quy\u1ec1n root \u0111\u1ec3 th\u1ef1c h\u00e0nh c\u00e0i NGINX?<\/h3>\n<p style=\"text-align: justify; font-size: 15px; margin-bottom: 15px;\">To\u00e0n b\u1ed9 l\u1ec7nh trong b\u00e0i \u0111\u1ec1u c\u1ea7n quy\u1ec1n root \u2014 th\u1ee9 shared hosting kh\u00f4ng c\u1ea5p. M\u1ed9t VPS ch\u1ea1y Ubuntu l\u00e0 m\u00f4i tr\u01b0\u1eddng g\u1ecdn nh\u1ea5t \u0111\u1ec3 b\u1ea1n c\u00e0i NGINX, d\u1ef1ng WordPress, Node.js hay Docker v\u00e0 l\u00e0m ch\u1ee7 c\u1ea5u h\u00ecnh t\u1eeb d\u00f2ng \u0111\u1ea7u ti\u00ean c\u1ee7a nginx.conf.<\/p>\n<p><a style=\"background: linear-gradient(90deg, #2563EB 0%, #1E3A8A 100%); color: white; padding: 12px 25px; text-decoration: none; font-weight: 600; border-radius: 8px; font-size: 15px; display: inline-block; box-shadow: 0 5px 15px rgba(37,99,235,0.3);\" href=\"https:\/\/interdata.vn\/thue-vps\/\" target=\"_blank\" rel=\"noopener\">Xem c\u1ea5u h\u00ecnh VPS ph\u00f9 h\u1ee3p \u27f6<\/a><\/p>\n<\/div>\n<\/div>\n<h2 id=\"section6\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin-top: 40px; margin-bottom: 20px; line-height: 1.4;\">Hi\u1ec3u NGINX l\u00e0 g\u00ec r\u1ed3i, n\u00ean ch\u1ea1y n\u00f3 tr\u00ean h\u1ea1 t\u1ea7ng n\u00e0o?<\/h2>\n<p style=\"text-align: justify;\">C\u00e2u tr\u1ea3 l\u1eddi ph\u1ee5 thu\u1ed9c v\u00e0o hai y\u1ebfu t\u1ed1: b\u1ea1n c\u00f3 c\u1ea7n quy\u1ec1n root kh\u00f4ng, v\u00e0 h\u1ec7 th\u1ed1ng c\u00f3 c\u1ea7n m\u1edf r\u1ed9ng nhi\u1ec1u node kh\u00f4ng. NGINX l\u00e0 ph\u1ea7n m\u1ec1m c\u00e0i tr\u00ean h\u1ec7 \u0111i\u1ec1u h\u00e0nh, n\u00ean h\u1ea1 t\u1ea7ng b\u00ean d\u01b0\u1edbi quy\u1ebft \u0111\u1ecbnh b\u1ea1n khai th\u00e1c \u0111\u01b0\u1ee3c bao nhi\u00eau s\u1ee9c m\u1ea1nh c\u1ee7a n\u00f3.<\/p>\n<ul style=\"list-style-type: disc; padding-left: 20px; margin-bottom: 25px; color: #1f2937;\">\n<li style=\"margin-bottom: 10px;\"><strong>Website\/blog\/\u1ee9ng d\u1ee5ng m\u1ed9t node:<\/strong> VPS l\u00e0 \u0111i\u1ec3m b\u1eaft \u0111\u1ea7u h\u1ee3p l\u00fd. B\u1ea1n c\u00f3 quy\u1ec1n root \u0111\u1ec3 c\u00e0i NGINX, PHP-FPM, database tr\u00ean c\u00f9ng m\u1ed9t m\u00e1y; chi ph\u00ed d\u1ec5 ti\u1ebfp c\u1eadn v\u00e0 \u0111\u1ee7 cho ph\u1ea7n l\u1edbn website v\u1eeba v\u00e0 nh\u1ecf.<\/li>\n<li style=\"margin-bottom: 10px;\"><strong>H\u1ec7 th\u1ed1ng nhi\u1ec1u backend, traffic bi\u1ebfn \u0111\u1ed9ng:<\/strong> khi NGINX chuy\u1ec3n sang vai tr\u00f2 load balancer \u0111\u1ee9ng tr\u01b0\u1edbc nhi\u1ec1u node \u1ee9ng d\u1ee5ng, b\u1ea1n c\u1ea7n h\u1ea1 t\u1ea7ng cho ph\u00e9p th\u00eam b\u1edbt t\u00e0i nguy\u00ean nhanh \u2014 \u0111\u00e2y l\u00e0 l\u00fac Cloud Server ph\u00e1t huy t\u00e1c d\u1ee5ng, nh\u1ea5t l\u00e0 m\u00f9a campaign ho\u1eb7c cao \u0111i\u1ec3m b\u00e1n h\u00e0ng.<\/li>\n<li style=\"margin-bottom: 10px;\"><strong>\u0110ang \u1edf shared hosting:<\/strong> kh\u00f4ng c\u00f3 g\u00ec sai khi \u1edf l\u1ea1i n\u1ebfu website c\u00f2n nh\u1ecf. Nh\u01b0ng shared hosting kh\u00f4ng cho t\u1ef1 c\u00e0i web server; th\u1eddi \u0111i\u1ec3m b\u1ea1n c\u1ea7n ch\u1ec9nh nginx.conf, b\u1eadt HTTP\/2 theo \u00fd m\u00ecnh hay d\u1ef1ng reverse proxy ch\u00ednh l\u00e0 th\u1eddi \u0111i\u1ec3m n\u00e2ng c\u1ea5p l\u00ean VPS.<\/li>\n<\/ul>\n<div style=\"display: flex; flex-wrap: wrap; background-color: #fff; border: 1.5px solid #BFDBFE; box-shadow: 0 8px 20px rgba(37,99,235,0.08); border-radius: 12px; overflow: hidden; margin: 35px 0;\">\n<div style=\"flex: 1; min-width: 250px; background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%); display: flex; align-items: center; justify-content: center; padding: 30px; text-align: center;\">\n<div>\n<p style=\"color: white; font-size: 34px; font-family: 'Be Vietnam Pro', sans-serif; font-weight: bold; margin: 0; line-height: 1.1;\">Cloud Server InterData<\/p>\n<p style=\"color: #dbeafe; font-size: 15px; font-weight: 600; margin-top: 12px;\">Scale t\u00e0i nguy\u00ean nhanh \u00b7 M\u1ea1ng t\u1ed1c \u0111\u1ed9 cao \u00b7 Ch\u1ed1ng DDoS<\/p>\n<\/div>\n<\/div>\n<div style=\"flex: 2; padding: 25px; min-width: 300px;\">\n<h3 style=\"font-family: 'Be Vietnam Pro', sans-serif; color: #1e3a8a; margin-top: 0; font-size: 20px;\">D\u1ef1ng NGINX load balancer cho h\u1ec7 th\u1ed1ng nhi\u1ec1u node?<\/h3>\n<p style=\"text-align: justify; font-size: 15px; margin-bottom: 15px;\">Khi upstream c\u1ee7a b\u1ea1n kh\u00f4ng c\u00f2n l\u00e0 m\u1ed9t server m\u00e0 l\u00e0 m\u1ed9t c\u1ee5m backend, Cloud Server cho ph\u00e9p n\u00e2ng c\u1ea5p CPU, RAM theo giai \u0111o\u1ea1n traffic thay v\u00ec mua d\u01b0 t\u1eeb \u0111\u1ea7u. Ph\u00f9 h\u1ee3p cho database l\u1edbn, ERP v\u00e0 \u1ee9ng d\u1ee5ng nhi\u1ec1u ng\u01b0\u1eddi d\u00f9ng \u0111\u1ed3ng th\u1eddi.<\/p>\n<p><a style=\"background: linear-gradient(90deg, #2563EB 0%, #1E3A8A 100%); color: white; padding: 12px 25px; text-decoration: none; font-weight: 600; border-radius: 8px; font-size: 15px; display: inline-block; box-shadow: 0 5px 15px rgba(37,99,235,0.3);\" href=\"https:\/\/interdata.vn\/cloud-server\/\" target=\"_blank\" rel=\"noopener\">T\u00ecm hi\u1ec3u Cloud Server \u27f6<\/a><\/p>\n<\/div>\n<\/div>\n<h2 id=\"section7\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin-top: 40px; margin-bottom: 20px; line-height: 1.4;\">FAQ: Gi\u1ea3i \u0111\u00e1p nhanh c\u00e1c th\u1eafc m\u1eafc khi t\u00ecm hi\u1ec3u NGINX l\u00e0 g\u00ec<\/h2>\n<h3 style=\"color: #1e3a8a; font-size: 19px; font-weight: bold; margin-top: 25px; margin-bottom: 10px;\">NGINX c\u00f3 mi\u1ec5n ph\u00ed kh\u00f4ng?<\/h3>\n<p style=\"text-align: justify;\">C\u00f3. B\u1ea3n NGINX Open Source ph\u00e1t h\u00e0nh theo gi\u1ea5y ph\u00e9p ki\u1ec3u BSD, d\u00f9ng mi\u1ec5n ph\u00ed c\u1ea3 cho m\u1ee5c \u0111\u00edch th\u01b0\u01a1ng m\u1ea1i v\u00e0 \u0111\u1ee7 cho ph\u1ea7n l\u1edbn nhu c\u1ea7u. F5 b\u00e1n th\u00eam b\u1ea3n NGINX Plus tr\u1ea3 ph\u00ed v\u1edbi c\u00e1c t\u00ednh n\u0103ng nh\u01b0 health check ch\u1ee7 \u0111\u1ed9ng, dashboard gi\u00e1m s\u00e1t v\u00e0 h\u1ed7 tr\u1ee3 ch\u00ednh h\u00e3ng.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 19px; font-weight: bold; margin-top: 25px; margin-bottom: 10px;\">NGINX ch\u1ea1y tr\u00ean Windows \u0111\u01b0\u1ee3c kh\u00f4ng?<\/h3>\n<p style=\"text-align: justify;\">\u0110\u01b0\u1ee3c, nginx.org c\u00f3 b\u1ea3n build cho Windows, nh\u01b0ng ch\u00ednh t\u00e0i li\u1ec7u ch\u00ednh th\u1ee9c ghi r\u00f5 hi\u1ec7u n\u0103ng b\u1ea3n n\u00e0y h\u1ea1n ch\u1ebf: m\u1ed9t worker ch\u1ec9 x\u1eed l\u00fd s\u1ed1 k\u1ebft n\u1ed1i gi\u1edbi h\u1ea1n v\u00e0 thi\u1ebfu v\u00e0i t\u00ednh n\u0103ng. Windows ph\u00f9 h\u1ee3p \u0111\u1ec3 h\u1ecdc v\u00e0 test; m\u00f4i tr\u01b0\u1eddng production n\u00ean ch\u1ea1y NGINX tr\u00ean Linux.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 19px; font-weight: bold; margin-top: 25px; margin-bottom: 10px;\">C\u00f3 c\u1ea7n bi\u1ebft Linux \u0111\u1ec3 d\u00f9ng NGINX kh\u00f4ng?<\/h3>\n<p style=\"text-align: justify;\">C\u1ea7n \u1edf m\u1ee9c c\u01a1 b\u1ea3n: SSH v\u00e0o server, di chuy\u1ec3n th\u01b0 m\u1ee5c, s\u1eeda file b\u1eb1ng nano ho\u1eb7c vim, ch\u1ea1y l\u1ec7nh systemctl. Kh\u00f4ng c\u1ea7n tr\u00ecnh \u0111\u1ed9 sysadmin chuy\u00ean s\u00e2u. N\u1ebfu b\u1ea1n c\u00e0i \u0111\u01b0\u1ee3c WordPress th\u1ee7 c\u00f4ng m\u1ed9t l\u1ea7n theo h\u01b0\u1edbng d\u1eabn, b\u1ea1n \u0111\u1ee7 n\u1ec1n \u0111\u1ec3 b\u1eaft \u0111\u1ea7u qu\u1ea3n l\u00fd NGINX.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 19px; font-weight: bold; margin-top: 25px; margin-bottom: 10px;\">NGINX c\u00f3 thay \u0111\u01b0\u1ee3c hosting kh\u00f4ng?<\/h3>\n<p style=\"text-align: justify;\">Kh\u00f4ng. NGINX l\u00e0 ph\u1ea7n m\u1ec1m, hosting hay VPS l\u00e0 h\u1ea1 t\u1ea7ng \u0111\u1ec3 ph\u1ea7n m\u1ec1m \u0111\u00f3 ch\u1ea1y. B\u1ea1n kh\u00f4ng &#8220;mua NGINX thay hosting&#8221; \u0111\u01b0\u1ee3c; th\u1ee9 b\u1ea1n c\u1ea7n l\u00e0 m\u1ed9t server c\u00f3 quy\u1ec1n root, r\u1ed3i c\u00e0i NGINX l\u00ean \u0111\u00f3. N\u00f3i c\u00e1ch kh\u00e1c, NGINX thay th\u1ebf ph\u1ea7n m\u1ec1m web server, kh\u00f4ng thay th\u1ebf m\u00e1y ch\u1ee7.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 19px; font-weight: bold; margin-top: 25px; margin-bottom: 10px;\">L\u00e0m sao bi\u1ebft website \u0111ang d\u00f9ng NGINX hay Apache?<\/h3>\n<p style=\"text-align: justify;\">Ch\u1ea1y <code>curl -I tenmien.com<\/code> v\u00e0 nh\u00ecn d\u00f2ng <code>Server:<\/code> trong header tr\u1ea3 v\u1ec1; gi\u00e1 tr\u1ecb &#8220;nginx&#8221; ho\u1eb7c &#8220;Apache&#8221; th\u01b0\u1eddng l\u1ed9 ra \u1edf \u0111\u00e2y. L\u01b0u \u00fd nhi\u1ec1u h\u1ec7 th\u1ed1ng \u1ea9n ho\u1eb7c s\u1eeda header n\u00e0y v\u00ec l\u00fd do b\u1ea3o m\u1eadt, v\u00e0 website \u0111\u1ee9ng sau CDN s\u1ebd hi\u1ec3n th\u1ecb t\u00ean CDN thay v\u00ec web server g\u1ed1c.<\/p>\n<div style=\"border-top: 2px dashed #BFDBFE; margin-top: 50px; padding-top: 30px;\">\n<h3 style=\"font-family: 'Be Vietnam Pro', sans-serif; color: #1e3a8a; font-size: 22px; font-weight: bold; margin-bottom: 15px;\">N\u1eafm ch\u1eafc NGINX, b\u01b0\u1edbc ti\u1ebfp theo l\u00e0 th\u1ef1c h\u00e0nh<\/h3>\n<p style=\"text-align: justify;\">\u0110\u1ebfn \u0111\u00e2y b\u1ea1n \u0111\u00e3 tr\u1ea3 l\u1eddi \u0111\u01b0\u1ee3c c\u00e2u h\u1ecfi NGINX l\u00e0 g\u00ec \u1edf m\u1ee9c \u0111\u1ee7 \u0111\u1ec3 ra quy\u1ebft \u0111\u1ecbnh: m\u1ed9t web server ki\u1ebfn tr\u00fac event-driven do Igor Sysoev vi\u1ebft n\u0103m 2004, hi\u1ec7n thu\u1ed9c F5, v\u1eeba ph\u1ee5c v\u1ee5 n\u1ed9i dung t\u0129nh v\u1eeba l\u00e0m reverse proxy v\u00e0 load balancer \u0111\u1ee9ng tr\u01b0\u1edbc backend. Ba \u0111i\u1ec1u \u0111\u00e1ng nh\u1edb nh\u1ea5t: NGINX x\u1eed l\u00fd h\u00e0ng ngh\u00ecn k\u1ebft n\u1ed1i tr\u00ean t\u00e0i nguy\u00ean th\u1ea5p nh\u1edd m\u00f4 h\u00ecnh master\u2013worker; n\u00f3 l\u00e0 l\u1ef1a ch\u1ecdn m\u1eb7c \u0111\u1ecbnh h\u1ee3p l\u00fd khi b\u1ea1n t\u1ef1 qu\u1ea3n server; v\u00e0 c\u00e1ch h\u1ecdc nhanh nh\u1ea5t l\u00e0 t\u1ef1 c\u00e0i, t\u1ef1 c\u1ea5u h\u00ecnh, t\u1ef1 l\u00e0m h\u1ecfng r\u1ed3i s\u1eeda tr\u00ean m\u1ed9t server c\u1ee7a ri\u00eang b\u1ea1n.<\/p>\n<div style=\"background: #EFF6FF; border: 1px solid #2563EB; padding: 30px; margin-top: 25px; border-radius: 12px; text-align: center;\">\n<p style=\"font-family: 'Be Vietnam Pro', sans-serif; font-size: 20px; font-weight: bold; color: #1e3a8a; margin-top: 0;\">S\u1eb5n s\u00e0ng t\u1ef1 tay d\u1ef1ng NGINX server \u0111\u1ea7u ti\u00ean?<\/p>\n<p style=\"font-size: 15px; margin-bottom: 20px; color: #4b5563;\">Ch\u1ecdn m\u1ed9t VPS c\u00f3 quy\u1ec1n root, SSD NVMe U.2 v\u00e0 \u0111\u1ed9i k\u1ef9 thu\u1eadt tr\u1ef1c 24\/7 khi b\u1ea1n c\u1ea7n tr\u1ee3 gi\u00fap.<\/p>\n<p><a style=\"background: #2563EB; color: #ffffff; padding: 12px 30px; text-decoration: none; font-weight: 600; border-radius: 6px; display: inline-block;\" href=\"https:\/\/interdata.vn\/thue-vps\/\" target=\"_blank\" rel=\"noopener\">Thu\u00ea VPS c\u00e0i NGINX ngay \u27f6<\/a><\/p>\n<\/div>\n<\/div>\n<p style=\"text-align: justify; font-size: 13px; font-style: italic; color: #6b7280; margin-top: 30px; border-top: 1px solid #E5E7EB; padding-top: 15px;\"><span style=\"font-size: 100%;\"><em>N\u1ed9i dung k\u1ef9 thu\u1eadt trong b\u00e0i mang t\u00ednh tham kh\u1ea3o. L\u1ec7nh, \u0111\u01b0\u1eddng d\u1eabn file v\u00e0 h\u00e0nh vi m\u1eb7c \u0111\u1ecbnh c\u00f3 th\u1ec3 kh\u00e1c nhau gi\u1eefa Ubuntu\/Debian, CentOS\/RHEL, gi\u1eefa c\u00e1c phi\u00ean b\u1ea3n NGINX ho\u1eb7c khi build t\u1eeb source. Tr\u01b0\u1edbc khi \u00e1p d\u1ee5ng cho h\u1ec7 th\u1ed1ng production, b\u1ea1n n\u00ean ki\u1ec3m th\u1eed tr\u00ean m\u00f4i tr\u01b0\u1eddng staging, sao l\u01b0u d\u1eef li\u1ec7u v\u00e0 c\u1ea5u h\u00ecnh hi\u1ec7n c\u00f3, \u0111\u1ed3ng th\u1eddi \u0111\u00e1nh gi\u00e1 r\u1ee7i ro theo \u0111\u1eb7c th\u00f9 h\u1ec7 th\u1ed1ng c\u1ee7a m\u00ecnh.<\/em><\/span><\/p>\n\n\n<style>\n.interdata-plan-carousel,.interdata-plan-carousel *{box-sizing:border-box}\n.interdata-plan-carousel{--blue:#005bea;--blue-dark:#004dcc;--text:#071832;--muted:#516173;--border:#d8e6fb;--bg:#f3f8ff;--shadow:0 5px 14px rgba(0,62,145,.08);container-type:inline-size;background:var(--bg);padding:14px 40px 18px;position:relative;overflow:hidden}\n.interdata-carousel-heading{color:#f00;font-family:Roboto,sans-serif;font-size:18px;line-height:1.35;font-weight:800;text-align:center;margin:0 0 14px}\n.interdata-plan-viewport{overflow:hidden;width:100%}\n.interdata-plan-track{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:0 0 4px}\n.interdata-plan-track::-webkit-scrollbar{display:none}\n.interdata-plan-card{flex:0 0 calc((100% - 36px)\/4);min-width:0;background:#fff;border:1px solid var(--border);border-radius:8px;padding:15px 10px 13px;min-height:370px;display:flex;flex-direction:column;scroll-snap-align:start;box-shadow:var(--shadow)}\n.interdata-plan-title{color:var(--blue-dark);font-size:16px;line-height:1.22;font-weight:800;text-align:center;margin:0 0 7px;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n.interdata-plan-price{color:var(--blue-dark);font-size:24px;line-height:1;font-weight:900;text-align:center;margin-bottom:12px;white-space:nowrap;letter-spacing:0}\n.interdata-plan-price span{font-size:10px;font-weight:800;margin-left:2px}\n.interdata-plan-badge{align-self:center;display:inline-flex;align-items:center;justify-content:center;background:#ff3934;color:#fff;border-radius:5px;padding:7px 8px;font-size:9px;line-height:1;font-weight:800;margin-bottom:15px;white-space:nowrap;max-width:100%}\n.interdata-plan-features{list-style:none!important;padding:0!important;margin:0!important}\n.interdata-plan-features li{display:flex;gap:7px;align-items:flex-start;color:var(--text);font-size:12px;line-height:1.35;font-weight:700;text-align:left;margin:0 0 10px!important;padding:0!important}\n.interdata-plan-icon{width:14px;min-width:14px;height:14px;color:#0069ff;margin-top:2px}\n.interdata-plan-icon svg{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}\n.interdata-plan-spacer{flex:1;min-height:16px}\n.interdata-plan-button{display:flex;align-items:center;justify-content:center;min-height:42px;width:100%;background:var(--blue);color:#fff!important;border-radius:5px;font-size:13px;font-weight:800;text-decoration:none!important;box-shadow:0 7px 14px rgba(0,91,234,.24);transition:transform .2s ease,background .2s ease}\n.interdata-plan-button:hover{background:var(--blue-dark);color:#fff!important;transform:translateY(-1px)}\n.interdata-carousel-arrow{position:absolute;top:50%;z-index:5;width:44px;height:54px;border:2px solid #fff!important;border-radius:999px;background:var(--blue)!important;color:#fff!important;box-shadow:0 8px 22px rgba(0,62,145,.32);display:flex!important;align-items:center;justify-content:center;cursor:pointer;transform:translateY(-35%);transition:background .2s ease,color .2s ease,opacity .2s ease,transform .2s ease}\n.interdata-carousel-arrow:hover{background:var(--blue-dark)!important;color:#fff!important;transform:translateY(-35%) scale(1.04)}\n.interdata-carousel-arrow:disabled{opacity:.78;cursor:not-allowed;background:#8aa6cf!important;color:#fff!important}\n.interdata-carousel-arrow:disabled:hover{background:#8aa6cf!important;color:#fff!important;transform:translateY(-35%)}\n.interdata-carousel-arrow svg{display:none!important}\n.interdata-carousel-arrow:before{content:none!important;display:none!important}\n.interdata-carousel-mark{display:block!important;color:#fff!important;font-family:Arial,Helvetica,sans-serif!important;font-size:38px!important;font-weight:900!important;line-height:1!important;text-align:center!important;pointer-events:none!important;transform:translateY(-2px)}\n.interdata-carousel-prev{left:14px}\n.interdata-carousel-prev .interdata-carousel-mark{margin-left:-2px}\n.interdata-carousel-next{right:14px}\n.interdata-carousel-next .interdata-carousel-mark{margin-right:-2px}\n@container (max-width:640px){.interdata-plan-carousel{padding:12px 38px 16px}.interdata-plan-card{flex-basis:calc((100% - 12px)\/2);min-height:370px}.interdata-carousel-heading{font-size:16px}}\n@container (max-width:480px){.interdata-plan-carousel{padding:12px 34px 16px}.interdata-plan-card{flex-basis:100%;min-height:360px}.interdata-plan-price{font-size:25px}.interdata-carousel-arrow{width:34px;height:44px}.interdata-carousel-mark{font-size:32px!important}.interdata-carousel-prev{left:5px}.interdata-carousel-next{right:5px}}\n<\/style>\n\n<div class=\"interdata-plan-carousel\" data-interdata-carousel>\n  <div class=\"interdata-carousel-heading\">Si\u00eau \u01afu \u0110\u00e3i VPS \/ CLOUD SERVER - Ti\u1ebft Ki\u1ec7m \u0110\u1ebfn 70%<\/div>\n\n  <svg width=\"0\" height=\"0\" style=\"position:absolute;visibility:hidden\" aria-hidden=\"true\">\n    <symbol id=\"id-icon-cpu\" viewBox=\"0 0 24 24\"><rect x=\"7\" y=\"7\" width=\"10\" height=\"10\" rx=\"2\"><\/rect><path d=\"M4 9h3M4 15h3M17 9h3M17 15h3M9 4v3M15 4v3M9 17v3M15 17v3\"><\/path><path d=\"M10 10h4v4h-4z\"><\/path><\/symbol>\n    <symbol id=\"id-icon-ram\" viewBox=\"0 0 24 24\"><rect x=\"4\" y=\"8\" width=\"16\" height=\"8\" rx=\"2\"><\/rect><path d=\"M7 16v2M11 16v2M15 16v2M19 16v2M7 11h1M11 11h1M15 11h1\"><\/path><\/symbol>\n    <symbol id=\"id-icon-storage\" viewBox=\"0 0 24 24\"><rect x=\"6\" y=\"3\" width=\"12\" height=\"18\" rx=\"2\"><\/rect><path d=\"M9 7h6\"><\/path><circle cx=\"12\" cy=\"16\" r=\"1.5\"><\/circle><\/symbol>\n    <symbol id=\"id-icon-network\" viewBox=\"0 0 24 24\"><path d=\"M5 12.5a10 10 0 0 1 14 0\"><\/path><path d=\"M8.5 16a5 5 0 0 1 7 0\"><\/path><path d=\"M12 19h.01\"><\/path><\/symbol>\n    <symbol id=\"id-icon-gift\" viewBox=\"0 0 24 24\"><rect x=\"3\" y=\"8\" width=\"18\" height=\"13\" rx=\"2\"><\/rect><path d=\"M12 8v13M3 12h18\"><\/path><path d=\"M7.5 8C6.1 8 5 6.9 5 5.5S6.1 3 7.5 3C10 3 12 8 12 8\"><\/path><path d=\"M16.5 8C17.9 8 19 6.9 19 5.5S17.9 3 16.5 3C14 3 12 8 12 8\"><\/path><\/symbol>\n  <\/svg>\n\n  <button class=\"interdata-carousel-arrow interdata-carousel-prev\" type=\"button\" aria-label=\"Xem 4 g\u00f3i tr\u01b0\u1edbc\">\n    <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M15 18l-6-6 6-6\"><\/path><\/svg>\n    <span class=\"interdata-carousel-mark\" aria-hidden=\"true\">&#8249;<\/span>\n  <\/button>\n\n  <div class=\"interdata-plan-viewport\">\n    <div class=\"interdata-plan-track\">\n      <article class=\"interdata-plan-card\">\n        <h3 class=\"interdata-plan-title\">Premium Base<\/h3>\n        <div class=\"interdata-plan-price\">299K<span>\/3 th\u00e1ng<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>2 vCore Intel<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>2GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>30GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Network: 300Mbps<\/li>\n        <\/ul>\n        <div class=\"interdata-plan-spacer\"><\/div>\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/best-value-plans-2026\/best-value-plans-premium-base\" target=\"_blank\" rel=\"nofollow sponsored noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\">\n        <h3 class=\"interdata-plan-title\">Premium Base<\/h3>\n        <div class=\"interdata-plan-price\">999K<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>3 vCore Intel<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>3GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>30GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Network: 300Mbps<\/li>\n        <\/ul>\n        <div class=\"interdata-plan-spacer\"><\/div>\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/cyber-week-2026\/premium-base\" target=\"_blank\" rel=\"nofollow sponsored noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\">\n        <h3 class=\"interdata-plan-title\">Premium Pro<\/h3>\n        <div class=\"interdata-plan-price\">2.599K<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>6 vCore Intel<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>8GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>80GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Network: 350Mbps<\/li>\n        <\/ul>\n        <div class=\"interdata-plan-spacer\"><\/div>\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/cyber-week-2026\/premium-pro\" target=\"_blank\" rel=\"nofollow sponsored noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\">\n        <h3 class=\"interdata-plan-title\">Premium Ultra<\/h3>\n        <div class=\"interdata-plan-price\">5.679K<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>12 vCore Intel<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>16GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>180GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Network: 450Mbps<\/li>\n        <\/ul>\n        <div class=\"interdata-plan-spacer\"><\/div>\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/cyber-week-2026\/premium-ultra\" target=\"_blank\" rel=\"nofollow sponsored noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\">\n        <h3 class=\"interdata-plan-title\">BD-CLOUD 1<\/h3>\n        <div class=\"interdata-plan-price\">988K<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>3 vCPU<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>3 GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>30 GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Network: 300 Mbps<\/li>\n        <\/ul>\n        <div class=\"interdata-plan-spacer\"><\/div>\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/cart.php?a=add&amp;pid=521&amp;billingcycle=annually\" target=\"_blank\" rel=\"nofollow sponsored noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\">\n        <h3 class=\"interdata-plan-title\">BD-CLOUD 2<\/h3>\n        <div class=\"interdata-plan-price\">2.988K<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>4 vCPU<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>8 GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>80 GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Network: 300 Mbps<\/li>\n        <\/ul>\n        <div class=\"interdata-plan-spacer\"><\/div>\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/cart.php?a=add&amp;pid=522&amp;billingcycle=annually\" target=\"_blank\" rel=\"nofollow sponsored noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\">\n        <h3 class=\"interdata-plan-title\">Cloud-Day - Base<\/h3>\n        <div class=\"interdata-plan-price\">2.666K<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-gift\"><\/use><\/svg><\/span>T\u1eb7ng 80GB S3 v\u00e0 1 n\u0103m s\u1eed d\u1ee5ng khi mua 2 n\u0103m tr\u1edf l\u00ean<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>4 vCPU AMD G3<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>6GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>60GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Network: 10Gbps<\/li>\n        <\/ul>\n        <div class=\"interdata-plan-spacer\"><\/div>\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/cloud-day-by-interdata-2026\/cloud-day-base\" target=\"_blank\" rel=\"nofollow sponsored noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\">\n        <h3 class=\"interdata-plan-title\">Cloud-Day - Pro<\/h3>\n        <div class=\"interdata-plan-price\">5.666K<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-gift\"><\/use><\/svg><\/span>T\u1eb7ng 200GB S3 v\u00e0 1 n\u0103m s\u1eed d\u1ee5ng khi mua 2 n\u0103m tr\u1edf l\u00ean<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>8 vCPU AMD G3<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>12GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>160GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Network: 10Gbps<\/li>\n        <\/ul>\n        <div class=\"interdata-plan-spacer\"><\/div>\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/cloud-day-by-interdata-2026\/cloud-day-pro\" target=\"_blank\" rel=\"nofollow sponsored noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n    <\/div>\n  <\/div>\n\n  <button class=\"interdata-carousel-arrow interdata-carousel-next\" type=\"button\" aria-label=\"Xem 4 g\u00f3i ti\u1ebfp theo\">\n    <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M9 18l6-6-6-6\"><\/path><\/svg>\n    <span class=\"interdata-carousel-mark\" aria-hidden=\"true\">&#8250;<\/span>\n  <\/button>\n<\/div>\n\n<script>\n(function(){\n  function setupInterDataCarousel(root){\n    var track=root.querySelector('.interdata-plan-track');\n    var prev=root.querySelector('.interdata-carousel-prev');\n    var next=root.querySelector('.interdata-carousel-next');\n    if(!track||!prev||!next||track.dataset.ready==='1')return;\n    track.dataset.ready='1';\n\n    function pageWidth(){\n      return track.clientWidth;\n    }\n\n    function updateButtons(){\n      var maxScroll=track.scrollWidth-track.clientWidth-2;\n      prev.disabled=track.scrollLeft<=2;\n      next.disabled=track.scrollLeft>=maxScroll;\n    }\n\n    prev.addEventListener('click',function(){\n      track.scrollBy({left:-pageWidth(),behavior:'smooth'});\n    });\n\n    next.addEventListener('click',function(){\n      track.scrollBy({left:pageWidth(),behavior:'smooth'});\n    });\n\n    track.addEventListener('scroll',function(){\n      window.requestAnimationFrame(updateButtons);\n    });\n\n    window.addEventListener('resize',updateButtons);\n    updateButtons();\n  }\n\n  function initInterDataCarousels(){\n    document.querySelectorAll('[data-interdata-carousel]').forEach(setupInterDataCarousel);\n  }\n\n  if(document.readyState==='loading'){\n    document.addEventListener('DOMContentLoaded',initInterDataCarousels);\n  }else{\n    initInterDataCarousels();\n  }\n})();\n<\/script>\n\n\t<div id=\"gap-1192562937\" class=\"gap-element clearfix\" style=\"display:block; height:auto;\">\n\t\t\n<style>\n#gap-1192562937 {\n  padding-top: 30px;\n}\n<\/style>\n\t<\/div>\n\t\n","protected":false},"excerpt":{"rendered":"<p>NGINX l\u00e0 g\u00ec m\u00e0 t\u1eeb trang l\u1ed7i 502 Bad Gateway \u0111\u1ebfn header response c\u1ee7a h\u00e0ng tri\u1ec7u website \u0111\u1ec1u th\u1ea5y t\u00ean n\u00f3? N\u1ebfu b\u1ea1n \u0111ang ph\u00e2n v\u00e2n ch\u1ecdn web server cho d\u1ef1 \u00e1n, ho\u1eb7c website ch\u1eadm d\u1ea7n khi l\u01b0\u1ee3ng truy c\u1eadp t\u0103ng, b\u00e0i vi\u1ebft n\u00e0y c\u1ee7a InterData s\u1ebd gi\u1ea3i th\u00edch r\u00f5 NGINX ho\u1ea1t \u0111\u1ed9ng ra sao,<\/p>\n","protected":false},"author":2,"featured_media":42665,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[150],"tags":[],"class_list":["post-16377","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-webserver"],"_links":{"self":[{"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/posts\/16377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/comments?post=16377"}],"version-history":[{"count":3,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/posts\/16377\/revisions"}],"predecessor-version":[{"id":42668,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/posts\/16377\/revisions\/42668"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/media\/42665"}],"wp:attachment":[{"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/media?parent=16377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/categories?post=16377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/tags?post=16377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}