GithubHelp home page GithubHelp logo

Comments (6)

Finb avatar Finb commented on May 23, 2024

是否有域名证书? nginx 配置文件发来看看

from bark-server.

macreee avatar macreee commented on May 23, 2024

是否有域名证书? nginx 配置文件发来看看

server {
listen 443;
server_name bark.macree.cn;
ssl on;
ssl_certificate bark.macree.cn.crt;
ssl_certificate_key bark.macree.cn.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
return 301 $scheme://bark.macree.cn:313$request_uri;
}
很奇怪,用http不填端口号也行,用https怎么都不行,我不太会Nginx,所以这里可能描述的不是很清楚

from bark-server.

Finb avatar Finb commented on May 23, 2024

你可以参考下我的配置
#5 (comment)

from bark-server.

macreee avatar macreee commented on May 23, 2024

你可以参考下我的配置
#5 (comment)

恩。我在研究一下。谢谢回复。

from bark-server.

macreee avatar macreee commented on May 23, 2024

把配置放这方便人看

申请好证书,把注释项按照自己需求修改了就好。

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name api.day.app ;#填写绑定证书的域名

    add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload";

    # certs sent to the client in SERVER HELLO are concatenated in ssl_certificate
    ssl_certificate ssl/day.app/day.app.cer;#证书文件名称默认目录同Nginx.conf
    ssl_certificate_key ssl/day.app/day.app.key;#私钥文件名称默认目录同Nginx.conf
    ssl_session_timeout 1d;
    ssl_session_cache shared:SSL:50m;
    ssl_session_tickets off;

    # modern configuration. tweak to your needs.
    ssl_protocols TLSv1.2;
    ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
    ssl_prefer_server_ciphers on;


    # OCSP Stapling ---
    # fetch OCSP records from URL in ssl_certificate and cache them
    ssl_stapling on;
    ssl_stapling_verify on;

    ## verify chain of trust of OCSP response using Root CA and Intermediate certs
    ssl_trusted_certificate ssl/ca.cer;#可忽略。如果要添加的话,可以使用同ssl_certificate相同的证书文件。

    location / {
       proxy_pass http://127.0.0.1:8081;#要转发的地址
    }

}

from bark-server.

mritd avatar mritd commented on May 23, 2024

最新文档已经更新 https://github.com/Finb/bark-server#nginx-proxy

from bark-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.