To build on mark's answer, it's recommended you create a configuration file for your site in sites-available. Just follow any tutorial for a simple nginx config and wiki.nginx.org for more details
After creating the configuration, create a symbolic link with this command, assuming that your conf file is named "myapp" and nginx is at /etc/nginx (could also be at /usr/local/etc/nginx):
ln -s /etc/nginx/sites-available/myapp /etc/nginx/sites-enabled/myapp
By the way, you could always create your conf file directly in sites-enabled but the recommended way above allows you to "enable and disable" sites on the server very quickly without actually moving/deleting your conf file.
P.S: Actually Don't trust the tutorials: check your configuration!
P.P.S: You can use the command nginx -t
to test your sites conf and nginx -s reload
to reload the conf.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…