Try use Ubuntu linux next time, personally think it is way easier to use.
So sites-available folder is in /etc/nginx/. You can do:
sudo vi /etc/nginx/sites-available/default, if password required, enter root user password.
Then input following code:
server {
listen 80;
listen [::]:80;
server_name localhost;
client_max_body_size 10M;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
# root html;
# index index.html;
proxy_pass http://127.0.0.1:5000;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
Then :wq
Remember to change the PORT if you're not running flask on 5000.
Then do ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled.
Then do sudo vi /etc/nginx/nginx.conf
Check if include /etc/nginx/sites-enabled/*; is inside http{...} and is not commended
Then :q to quit
Then do sudo nginx -s reload if your nginx is running, or do sudo systemctl start nginx if it is not running.
Then Open http://yourWebsite
For more details for you to understand nginx:
This is not necessary
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
You can change the default to any other name you want
Folder sites-available is for the different sites on the server
Folder sites-enabled is for the shortcuts of files in sites-available
files in sites-available will be imported through include /etc/nginx/sites-enabled/*; into nginx.conf