注册账号登录
吴世剑
小度鱼作者,野生设计师,野生程序员。
关注

v2.2.1 小更新,优化了一些UI小细节。

3条评论 / 8条回复

评论样式和个人信息点赞

回复

图片上传显示菊花了

手机端发帖标题选框未剧中

回复弹出样式 圆角上下没有统一

回复

收到,然后图片上传失败吗?我刚刚试了一下,可以正常上传。

1月7日
回复

大佬 nginx 配置文件可以拷贝发我一份参考啊

1月7日
回复

server {

proxy_max_temp_file_size 0;

fastcgi_buffers 8 32k;

send_timeout 30;

client_max_body_size 10m;

client_body_buffer_size 1024k;

listen 443 ssl http2;

server_name api.xiaoduyu.com;

# ssl on;

ssl_certificate /etc/nginx/ssl/www.xiaoduyu.com/www.xiaoduyu.com.cer;

ssl_certificate_key /etc/nginx/ssl/www.xiaoduyu.com/www.xiaoduyu.com.key;

charset utf-8;

access_log /home/api.xiaoduyu.com.access.log main;

error_log /home/api.xiaoduyu.com.error.log;

location / {

proxy_pass http://127.0.0.1:9002;

proxy_redirect off;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header Host $http_host;

proxy_set_header X-NginX-Proxy true;

proxy_http_version 1.1;

proxy_set_header Upgrade $http_upgrade;

proxy_set_header Connection "upgrade";

}

}

server {

fastcgi_buffers 8 32k;

send_timeout 60;

listen 80;

server_name xiaoduyu.com www.xiaoduyu.com api.xiaoduyu.com;

rewrite ^(.*)$ https://$host$1 permanent;

}

server {

listen 443 ssl http2;

server_name xiaoduyu.com;

# ssl on;

ssl_certificate /etc/nginx/ssl/www.xiaoduyu.com/www.xiaoduyu.com.cer;

ssl_certificate_key /etc/nginx/ssl/www.xiaoduyu.com/www.xiaoduyu.com.key;

rewrite ^/(.*)$ https://www.xiaoduyu.com/$1 last;

}

server {

proxy_max_temp_file_size 0;

fastcgi_buffers 8 32k;

send_timeout 30;

client_max_body_size 10m;

client_body_buffer_size 1024k;

proxy_connect_timeout 300;

proxy_read_timeout 300;

proxy_send_timeout 300;

listen 443 ssl http2;

server_name www.xiaoduyu.com;

# if ($host = "xiaoduyu.com") {

# rewrite ^/(.*)$ https://www.xiaoduyu.com/$1 last;

# }

# ssl on;

ssl_certificate /etc/nginx/ssl/www.xiaoduyu.com/www.xiaoduyu.com.cer;

ssl_certificate_key /etc/nginx/ssl/www.xiaoduyu.com/www.xiaoduyu.com.key;

charset utf-8;

access_log /home/xiaoduyu.com.access.log main;

error_log /home/xiaoduyu.com.error.log;

location ^~/graphql {

proxy_pass http://127.0.0.1:9002;

proxy_redirect off;

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header X-NginX-Proxy true;

}

location ^~/api/ {

proxy_pass http://127.0.0.1:9002;

proxy_redirect off;

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header X-NginX-Proxy true;

}

location /socket.io/ {

proxy_pass http://127.0.0.1:9002;

proxy_http_version 1.1;

proxy_set_header Upgrade $http_upgrade;

proxy_set_header Connection "upgrade";

proxy_set_header Host $host;

}

location / {

proxy_pass http://127.0.0.1:8002;

proxy_redirect off;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header Host $http_host;

proxy_set_header X-NginX-Proxy true;

}

}

server {

proxy_max_temp_file_size 0;

fastcgi_buffers 32 8k;

client_max_body_size 500m;

client_body_buffer_size 1024k;

listen 80;

server_name admin.xiaoduyu.com;

charset utf-8;

access_log /home/admin.xiaoduyu.com.access.log main;

location ^~/graphql {

proxy_pass http://127.0.0.1:9002;

proxy_redirect off;

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

}

location / {

proxy_pass http://127.0.0.1:7001;

proxy_redirect off;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header Host $http_host;

proxy_set_header X-NginX-Proxy true;

}

}

1月7日1 人赞
回复

谢谢大佬

1月7日
回复

想用caddy来做服务试试看 参考下在去看caddy的文档

1月7日1 人赞
回复

好像可以了 昨天夜晚 应该网速问题

1月7日1 人赞
回复

前辈,有没有不加入https的nginx配置供参考呀,最后那个代理为啥^~/graphql和/ 不一样呢

1月15日
回复

上面也有http的例子,例如 admin.xiaoduyu.com 的配置单。

1月16日
回复

nice!!!

回复
吴世剑
小度鱼作者,野生设计师,野生程序员。
关注私信
308
关注
107
粉丝
155
帖子