使用nginx绑定域名访问的示例:
1.打开nginx配置文件。
2.找到server_name的值修改为域名即可。
server {
listen 80;
server_name yisu.com; #域名
client_max_body_size 5M;
gzip on;
gzip_buffers 32 4K;#压缩在内存中缓冲32块 每块4K
gzip_comp_level 6 ;#压缩级别 推荐6
gzip_min_length 4000;#开始压缩的最小长度4bit
gzip_types text/plain application/json application/javascript application/x-javascript application/css application/xml application/xml+rss text/javascript application/x-httpd-php image/jpeg image/gif image/png image/x-ms-bmp;
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:8000;
uwsgi_ignore_client_abort on;
}
location /static {
alias /root/make-money/static/;
}
}