- nginx
- nginx的ssl证书规范配置
nginx的ssl证书规范配置
1、目录:
nginx/conf/cert/年份
2、域名配置:
nginx/conf/vhost/域名.conf
3、证书配置:
3.1、文件名定义:
域名.key
域名.pem
3.2、配置例子
ssl_certificate cert/2020/www.mainboot.com.pem;
1、目录:
nginx/conf/cert/年份
2、域名配置:
nginx/conf/vhost/域名.conf
3、证书配置:
3.1、文件名定义:
域名.key
域名.pem
3.2、配置例子
ssl_certificate cert/2020/www.mainboot.com.pem;
ssl_certificate_key cert/2020/www.mainboot.com.key;
server { listen 443 ssl; server_name www.mainboot.com mainboot.com; ssl_certificate cert/2020/www.mainboot.com.pem; ssl_certificate_key cert/2020/www.mainboot.com.key; root /mnt/sda3/mysoft/php/wwwroot/mainboot; index index.php index.html index.htm; location / { if (!-e $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; break; } } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 100d; } location ~ .*\.(js|css)?$ { expires 30d; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } location ~ \.php(/|$) { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; set $fastcgi_script_name2 $fastcgi_script_name; if ($fastcgi_script_name ~ "^(.+\.php)(/.+)$") { set $fastcgi_script_name2 $1; set $path_info $2; } fastcgi_param PATH_INFO $path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name2; fastcgi_param SCRIPT_NAME $fastcgi_script_name2; } access_log logs/www.mainboot.access.log; error_log logs/www.mainboot.error.log; }