“Nginx的那些事”的版本间的差异
跳到导航
跳到搜索
第16行: | 第16行: | ||
</pre> | </pre> | ||
+ | =nginx conf= | ||
+ | ==80 443 共存== | ||
+ | <pre> | ||
+ | server | ||
+ | { | ||
+ | listen 80; | ||
+ | listen 443 ssl; | ||
+ | server_name www.iamle.com; | ||
+ | index index.html index.htm index.php; | ||
+ | root /home/wwwroot/www.iamle.com/; | ||
+ | #ssl on; 这里要注释掉 | ||
+ | ssl_certificate /usr/local/nginx/conf/ssl/www_iamle_com.crt; | ||
+ | ssl_certificate_key /usr/local/nginx/conf/ssl/www_iamle_com.key; | ||
+ | |||
+ | #以下配置省略 | ||
+ | |||
+ | } | ||
+ | |||
+ | </pre> | ||
[https://www.nginx.cn/install Nginx安装] | [https://www.nginx.cn/install Nginx安装] |
2020年11月4日 (三) 09:17的版本
symbolic
有意思的 include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; root@debian:/etc/nginx/sites-enabled# pwd /etc/nginx/sites-enabled root@debian:/etc/nginx/sites-enabled# file default default: symbolic link to /etc/nginx/sites-available/default
nginx conf
80 443 共存
server { listen 80; listen 443 ssl; server_name www.iamle.com; index index.html index.htm index.php; root /home/wwwroot/www.iamle.com/; #ssl on; 这里要注释掉 ssl_certificate /usr/local/nginx/conf/ssl/www_iamle_com.crt; ssl_certificate_key /usr/local/nginx/conf/ssl/www_iamle_com.key; #以下配置省略 }