2016-07-08 Nginx 配置笔记 引子本篇记录学习 nginx 的点滴 主要配置整合 ThinkPHP1234567891011121314151617vim nginx.conflocation / { root /var/www/html; index index.html index.php; # ThinkPHP hide index.php try_files $uri $uri/ /index.php?s=$uri&$args;}location ~ \.php { root /var/www/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_split_path_info ^(.+\.php)(/.*)$; fastcgi_param PATH_INFO $fastcgi_path_info; include fastcgi.conf;} 设置 HTTPS12345678910111213141516listen 443 ssl default_server;listen [::]:443 ssl default_server;ssl_certificate server.crt; # 注意 bundle.crt ssl_certificate_key server.key;# 强制 HTTPSserver { listen 80; rewrite ^(.*)$ https://$host$1 permanent;}server { listen 443; # blahblah....} 参考资料https://s.how/nginx-ssl/ Newer 12306 API 研究 Older Ubuntu14.04 导入第三方源安装 LNMP 堆栈