openssl req -new -x509 -nodes -out server.crt -keyout server.key
[root@localhost .ssh]# vim /etc/nginx/conf.d/ssl.conf
#
# HTTPS server configuration
#
server {
listen 443;
server_name 192.168.11.226;
ssl on;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
location / {
root /ssd/www/zencart/website;
index index.php index.html index.htm;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root /ssd/www/zencart/website;
#root /usr/share/nginx/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME /ssd/www/zencart/website/$fastcgi_script_name;
include fastcgi_params;
}
}
重启 nginx