title: How to use my.nuxt.dev instead of my.nuxt.dev:3001 without changing the port?
body: <p>In my DNS, I have the an URL <code>my.nuxt.dev</code> redirecting to <code>192.168.1.2</code> where my Nuxt instance is installed. In <code>nuxt.config.js</code>, I have configured:</p>
  <pre><code>  server: {
      port: 3001,
      host: 'my.nuxt.dev'
    },
  </code></pre>
  <p>Now, when I want to access the Nuxt website, I have to open <code>my.nuxt.dev:3001</code>. What should I change in my configuration to just use <code>my.nuxt.dev</code> (without using another port) ?</p>
  <p>===</p>
  <p>I tried to fix it with Nginx proxy:</p>
  <p><code>/etc/nginx/sites-enabled/my-nuxt.conf</code></p>
  <pre><code>server {
          listen 80;
          server_name my.nuxt.dev;
  
          location / {
                  proxy_set_header   X-Forwarded-For $remote_addr;
                  proxy_set_header   Host $http_host;
                  proxy_pass         &quot;http://127.0.0.1:3001&quot;;
          }
  }
  </code></pre>
  <p>But I get an error message in my browser:</p>
  <blockquote>
  <p>502 Bad Gateway
  nginx/1.18.0 (Ubuntu)</p>
  </blockquote>
  <p>Maybe because I also have another Nginx server block (virtual host) on the same port (?):</p>
  <p><code>/etc/nginx/sites-enabled/my-laravel.conf</code></p>
  <pre><code>server {
          listen 80;
          server_name my.laravel.dev;
          ...
  }
  </code></pre>