Nginx配置文件:
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
server {
listen 80;
server_name hundun4a.com;
rewrite ^(.*)$ https://hundun4a.com;}
server {
listen 443;
server_name hundun4a.com;
ssl on;
ssl_certificate cert/1989473_www.hundun4a.com.pem;
ssl_certificate_key cert/1989473_www.hundun4a.com.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
root /www/new/dist;
index index.html index.htm;
}
}
}
Nginx配置解析
本文提供了Nginx服务器的一个具体配置实例,展示了如何配置HTTP服务、启用SSL加密、设置证书及密钥路径,并指定了静态资源根目录和索引文件。
809

被折叠的 条评论
为什么被折叠?



