1. Install Nginx
apt-get install nginx
y
2.Nginx Configuration
1. Delete the default:
# Prevent errors, first delete the default file to cd / etc / nginx / sites-the Available / RM default LS cd / etc / nginx / sites-Enabled LS RM default LS
2. Create a new configuration file:
cd /etc/nginx/sites-available/ vim gg.conf
3. Edit Content:
i # to enter edit mode
content:
server{ listen 80; server_name gg; charset utf-8; client_max_body_size 75M; location /static { alias /home/ubuntu/gg/static; } location /media { alias /home/ubuntu/gg/media; } location / { uwsgi_pass 127.0.0.1:8000; include /etc/nginx/uwsgi_params; } }
Save and exit:
+ Esc to enter: wq + Enter to save and exit #