server {
listen 80;
server_name example.runoseai.com default_server;
location / {
rewrite ^ https://$host$request_uri? permanent;
}
}
server {
listen 443;
ssl on;
ssl_certificate /shared/ssl/your-ssl-crt.crt;
ssl_certificate_key /shared/ssl/your-ssl-key.key;
ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS;
The modification content is as above. When reloading nginx command, the error is as follows:
nginx: [emerg] unknown directive “ssl” in /etc/nginx/sites-enabled/seafile.nginx.conf:13
What is the problem?
Thanks, I changed it to this way and reloaded ngxin successfully, but seafile cannot be accessed. What is the problem?
The web client cannot log in through https://+deployment IP address or https://certificate binding domain name address
The picture shows the nginx configuration. Before adding the certificate, you can successfully log in via http://+ip address
The problem is that port 443 is not open. How can I open it?
Resolved, June 9, 2025
listen 443 ssl;
This is the correct format for nginx to enable https. Your way of writing is now deprecated.
What exactly is the situation that makes it impossible to enter?
First, make sure that https access can be opened normally before it is modified. If it cannot be opened after the modification, it is recommended to post the nginx configuration so that everyone can help you see where the problem is.