Notice: 函数 WP_Scripts::localize 的调用方法不正确$l10n 参数必须是一个数组。若要将任意数据传递给脚本,请改用 wp_add_inline_script() 函数。 请查阅调试 WordPress来获取更多信息。 (这个消息是在 5.7.0 版本添加的。) in /data/www/appblog/wp-includes/functions.php on line 6131

Nginx配置SSL证书实现HTTPS访问

申请第三方权威认证机构(如CA,Symantec,GeoTrust,CFCA)签发的SSL数字证书,实现网站HTTPS访问

证书文件:

app.yezhou.cc.jks
app.yezhou.cc.key
app.yezhou.cc.pem
app.yezhou.cc.pfx

虚拟主机配置:

server {
    listen       80;
    listen       443 ssl;
    server_name  app.yezhou.cc;
    index index.html index.htm index.php;
    root /data/www/app;
    server_name_in_redirect off;

    location ~ .+\.php($|/)
    {
        #fastcgi_pass  unix:/tmp/php-cgi.sock;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        include       fastcgi.conf;

        fastcgi_split_path_info  ^(.+\.php)(/.*)$;
        fastcgi_param  PATH_INFO $fastcgi_path_info;
    }
    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
        expires 30d;
    }
    location ~ .*\.(js|css)?$
    {
        expires 1h;
    }
    #伪静态及日志
    #include /data/server/nginx/conf/rewrite/app.conf;
    error_log /data/www/logs/app-error.log;
    access_log /data/www/logs/app-access.log;

    ssl on;
    ssl_certificate /data/ssl/app/app.yezhou.cc.pem;
    ssl_certificate_key /data/ssl/app/app.yezhou.cc.key;
    ssl_session_timeout 5m;
}
上一篇 Nginx非80端口访问域名配置
下一篇 Nginx开启文件目录列表显示功能