个人工作知识笔记
主页
Linux运维
Thinkphp相关
功能开发代码
常用工具
低频方案
常用软件
日记流水
账号体系
思考规划
添加内容
记日记
本网站
>
常用功能代码
TP安装及常用命令
TP控制器相关使用
linux常用命令
SQL常用代码
Ajax传输样例
TP6操作手册
TP3.2操作手册
coscmd配置
Ngix配置
WX错误代码
SLL配置
curl命令详解
功能
跳转至前台
数据备份
退出登录
标题
类别
Linux运维
Thinkphp相关
功能开发代码
常用工具
低频方案
是否隐藏
内容详情
<p><b>Nginx启动不起来 请检查Nginx安装目录下面的log日志</b></p><p><b>nginx不重启使配置生效 输入命令</b>:nginx -s reload</p><p>server {</p><p>listen 80;</p><p>server_name www.网址.com;</p><p> rewrite ^(.*)$ https://$host$1 permanent;</p><p> location / {</p><p> }</p><p> }</p><p><br></p><p>server {</p><p>listen 80;</p><p>server_name 网址.com;</p><p> rewrite ^(.*)$ https://www.网址.com permanent;</p><p> location / {</p><p> }</p><p> }</p><p><br></p><p>server {</p><p> listen 443;</p><p> server_name www.网址.com; #填写绑定证书的域名</p><p> ssl on;</p><p> ssl_certificate /usr/local/nginx/conf/ssl/1_www_bundle.crt;</p><p> ssl_certificate_key /usr/local/nginx/conf/ssl/2_www.key;</p><p> ssl_session_timeout 5m;</p><p> ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配置</p><p> ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照这个套件配置</p><p> ssl_prefer_server_ciphers on;</p><p> index index.html index.htm index.php;</p><p>root /www/path/;</p><p>location ~ [^/]\.php(/|$) {</p><p> #fastcgi_pass remote_php_ip:9000;</p><p> fastcgi_pass unix:/dev/shm/php-cgi.sock;</p><p> fastcgi_index index.php;</p><p> include fastcgi.conf;</p><p>}</p><p><br></p><p>location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$</p><p>{</p><p>expires 30d;</p><p>}</p><p>location ~ .*\.(js|css)?$</p><p>{</p><p>expires 1h;</p><p>}</p><p> if (!-e $request_filename) {</p><p>rewrite ^(.*)/(.+)list-([0-9]+)-([0-9]+)\.html$ $1/index.php?a=$2list&fid=$3&p=$4 last;</p><p>rewrite ^(.*)/(.+)list-([0-9]+)\.html$ $1/index.php?a=$2list&fid=$3 last;</p><p>rewrite ^(.*)/(.+)-([0-9]+)\.html$ $1/index.php?a=$2&id=$3 last;</p><p>rewrite ^(.*)/(.+)\.html$ $1/?a=$2 last;</p><p>rewrite ^(.*)$ /index.php?s=$1 last;</p><p>}</p><p> }</p><p><br></p><p>server {</p><p> listen 80;</p><p> server_name www.网址.com</p><p>index index.html index.htm index.php;</p><p>root /www/path;</p><p>location ~ [^/]\.php(/|$) {</p><p> #fastcgi_pass remote_php_ip:9000;</p><p> fastcgi_pass unix:/dev/shm/php-cgi.sock;</p><p> fastcgi_index index.php;</p><p> include fastcgi.conf;</p><p>}</p><p><br></p><p>location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|ttf)$</p><p>{</p><p>expires 30d;</p><p>}</p><p>location ~ .*\.(js|css)?$</p><p>{</p><p>expires 1h;</p><p>}</p><p>if (!-e $request_filename) { </p><p> rewrite ^(.*)$ /index.php?s=$1 last; </p><p> break; </p><p>} </p><p>}</p>
立即提交