代码拉取完成,页面将自动刷新
# mysite_nginx.conf
# the upstream component nginx needs to connect to
upstream django {
# server unix:///path/to/your/mysite/mysite.sock; # for a file socket
server 127.0.0.1:8001; # for a web port socket (we'll use this first)
}
# configuration of the server
server {
# the port your site will be served on
listen 80;
# the domain name it will serve for
server_name server_name; # substitute your machine's IP address or FQDN
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
charset utf-8;
gzip on;
gzip_types text/plain application/x-javascript text/css text/javascript application/x-httpd-php application/json text/json image/jpeg image/gif image/png application/octet-stream;
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
# max upload size
client_max_body_size 75M; # adjust to taste
# Django media
location /media/ {
alias /ur/local/project/mysite/media/; # your Django project's media files - amend as required
}
location /static/ {
alias /usr/local/project/mysite/static/;
}
# Finally, send all non-media requests to the Django server.
location / {
include uwsgi_params;
uwsgi_connect_timeout 30;
uwsgi_pass unix:/usr/local/project/mysite/uwsgi.sock;
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。