title: Nginx is using both port 80 and 8080
body: <p>I changed listening port of nginx from 80 to 8080 in <code>/etc/nginx/site-enabled/default</code>  but when in <code>netstat -plnt</code> result it use both of them:</p>
  
  <p><a href="https://i.stack.imgur.com/NhnFq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NhnFq.png" alt="enter image description here"></a></p>
  
  <p>here is my nginx default config </p>
  
  <pre><code>server {
      listen 8080 default;
      root /home/mosi/workspace;
  
      # Add index.php to the list if you are using PHP
      index index.html index.htm index.php;
  
      server_name _;
  
      location / {
              try_files $uri $uri/ =404;
      }
  
      location ~ \.php$ {
              include snippets/fastcgi-php.conf;
              fastcgi_pass unix:/run/php/php7.2-fpm.sock;
      }
  </code></pre>
  
  <p>}</p>
  
  <p><strong>Problem solved</strong></p>
  
  <p>Since I had many other config file, I just added port listening line in other configs and It work correct now
  Tahnks</p>