title: How to configure nginx on Amazon Linux 2?
body: <p>I am new to nginx and tried some tutorials to configure nginx on Amazon Linux 2. For a simple start I tried to show just another html page instead of the welcome page of nginx. The problem is thats no matter what changes I do in the nginx.conf file. Nothing change. The most confusing part is even if I stop nginx the welcome page is stil available. I started a new ec2-instance a moment ago and I did the following:</p>
  <p><code>sudo amazon-linux-extras install nginx</code></p>
  <p><code>sudo systemctl start nginx</code></p>
  <p>Now the welcome page is available with the amazon url: ec2-<strong>-</strong>-<em><strong>-</strong></em>.eu-central-1.compute.amazonaws.com.</p>
  <p><code>sudo systemctl stop nginx</code></p>
  <p>systemctl status shows that nginx is dead but the welcome page is still available. I am really confused, it seems didnt understand some fundamentals about nginx. Something similar happened if I change the nginx.conf file (for example I comment the complete server body out) and restart nginx. Nothing changed, the welcome page is still available...</p>
  <p>best regards</p>