Fetch the repository succeeded.
This action will force synchronization from laipzh/stock, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
# 设置nginx启动
# systemctl enable nginx
server {
listen 8080;
server_name www.pythonstock.com;
root /usr/share/nginx/html;
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
# 开启gzip
gzip on;
# 启用gzip压缩的最小文件;小于设置值的文件将不会被压缩
gzip_min_length 1k;
# gzip 压缩级别 1-10
gzip_comp_level 2;
# 进行压缩的文件类型。
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
# 是否在http header中添加Vary: Accept-Encoding,建议开启
gzip_vary on;
access_log /var/log/nginx/stock.access.log main;
error_log /var/log/nginx/stock.error.log warn;
# https://medium.com/aviabird/413-414-request-url-entity-too-large-error-nginx-b6dcece6f5dd
# 解决GET 参数过长问题。
client_max_body_size 10M;
large_client_header_buffers 4 20k;
location ^~ /static/ {
access_log off;
# 需要把源代码,再下载一遍。
root /data/pythonstock/stock/web;
expires 30d; # 设置30天超时
# 参考 https://www.cnblogs.com/kevingrace/p/10459429.html
# add_header Cache-Control max-age=360000;
}
location / {
proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:9999;
expires 0;
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。