nginx 非标准同一端口https

    server {
        listen      9999 ssl;
        server_name  home.vimll.com;
        client_header_buffer_size 16k;
        large_client_header_buffers 4 32k;
        client_max_body_size 1000m;
        client_body_buffer_size 128k;
        ssl_certificate      /root/.acme.sh/vimll.com/fullchain.cer;
        ssl_certificate_key  /root/.acme.sh/vimll.com/vimll.com.key;

        ssl_session_cache    shared:SSL:10m;
        ssl_session_timeout  5m;

        ssl_ciphers  HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers  on;
#       error_page 497 301 400 https://$http_host$request_uri;
        error_page 302 497 301 400 https://$http_host$request_uri;
        rewrite /wp-admin$ $scheme://$host$uri/ permanent;

        location / {
                root  /usr/share/nginx/html/;
                index  index.php index.html index.htm;
                try_files $uri $uri/ /index.php?q=$uri&$args;
#                mirror /mirror;
#                mirror_request_body on;
#        if (-f $request_filename/index.html){
#               rewrite (.*) $1/index.html break;
#        }
#        if (-f $request_filename/index.php){
#               rewrite (.*) $1/index.php;
#         }
#        if (!-f $request_filename){
#               rewrite (.*) /index.php;
#         }
#                       proxy_connect_timeout 3000;
#                       proxy_send_timeout 3000;
#                       proxy_read_timeout 3000;
#                       proxy_buffer_size 4k;
#                       proxy_buffers 4 32k;
#                       proxy_busy_buffers_size 64k;
#        rewrite ^/(.*)$  https://$host$1 permanent;
#        return      301 https://$server_name:9443$request_uri;
            }
#location = /mirror {
#    internal;
#    proxy_pass http://diiing.jintdev.com;
#}

        location /ngx_status {
                stub_status on;
                access_log off;
                #allow 127.0.0.1;允许哪个ip可以访问
                deny all;
        }

        #location /music/ {
        #        root /data/;
        #        autoindex on;
        #        autoindex_exact_size off;
        #        autoindex_localtime on;
        #        charset utf-8,gbk;
        #        auth_basic "Music Access";
        #        auth_basic_user_file /etc/nginx/htpasswd;

        #}
        location /download/ {
                root /data/;
                autoindex on;
                autoindex_exact_size off;
                autoindex_localtime on;
                charset utf-8,gbk;
               # auth_basic "Music Access";
               # auth_basic_user_file /etc/nginx/htpasswd;

        }


        location ~* ^.+\.(html|htm|gif|jpg|jpeg|bmp|png|ico|txt|js|css|mmf)$ {
                expires 3d;
                root  /usr/share/nginx/html/;
                proxy_temp_path /usr/share/nginx/html/;
        }
            error_page 404 /404.html;
           location = /40x.html {
       }

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }

        location ~ \.php$ {
            root   /usr/share/nginx/html/;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
#           fastcgi_param  PATH_INFO  $fastcgi_path_info;
#            fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
#            fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
            include        fastcgi_params;
            index index.php index.html index.htm;
        }
    }