Nginx常见应用场景及配置 Web服务器 HTTP: 1 2 3 4 5 6 7 8 server { listen 80; server_name _; location / { root /data/wwwroot; index index.html index.htm; } } HTTPS: 1 2 3 4 5 6 7 8 9 10 server { listen 443 ssl; server_name _; ssl_certificate /path/to/certificate.crt; ssl_certificate_key /path/to/private-key.key; location / {