P粉2519031632023-08-14 09:05:38
You can generate an SSL certificate for free using letsencrypt, or obtain it from cloudflare.
If you are using nginx, you can find instructions on how to install the certificate in the documentation: http://nginx.org/en/docs/http/configuring_https_servers.html
If you are using apache:
<VirtualHost 162.0.118.14:443> DocumentRoot /var/www/ SSL Engine on SSLCertificateFile /path/to/your_domain_name.crt SSLCertificateKeyFile /path/to/your_private.key SSLCertificateChainFile /path/to/cert.crt </VirtualHost>
Please remember that the default port for https is 443. If your server is running on port 3000, you need to set up a reverse proxy to point port 443 to port 3000.
nginx reverse proxy configuration: https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/