Notes tagged with "Nginx"
Web Application Setup - Nginx Set Up
NGINX SET UP
-
Create your apps nginx configuration
... touch /var/www/appname/config/nginx-appname.cfg -
The content of your
nginx-appname.cfgfiles should look like this:upstream appname { server unix:/var/run/uwsgi/appname.socket; } server { listen 80; server_name SERVER_IP SERVER_DOMAIN; location = /favicon.ico { access_log off; log_not_found off; } location /static/ { root /var/www/appname/; } location / { uwsgi_pass appname; include /etc/nginx/uwsgi_params; } } -
Link your nginx config file to nginx’ site config directory:
... cd /etc/nginx/sites-enabled ... ln -s /var/www/appname/config/appname-nginx.cfg appname -
You can check your nginx config by running the following: