nginx ssl pathinfo 伪静态 301 配置文件
server {
listen ;
root /www/web/test_com/public_html;
server_name test.com test.com;
if ($host != '***.com')
#注意,这里很严格,if后面要有空格,!=两边都是空格。
{
rewrite ^/(.*)$ https://www.***.com/$1 permanent;
}
if ($scheme = http ) {
return https://www.***.com$request_uri;
}
index index.html index.php index.htm;
error_page /errpage/.html;
error_page /errpage/.html;
error_page /errpage/.html;
error_page /errpage/.html;
#location ~ \.php(.*)$ {
# fastcgi_pass unix:/tmp/php--cgi.sock;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME $DOCUMENT_ROOT$fastcgi_script_name;
# fastcgi_param PATH_INFO $;
# include fcgi.conf;
#}
location ~ \.php {
fastcgi_pass unix:/tmp/php--cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
set $real_script_name $;
set $path_info $;
}
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
}
location ~ /\.ht {
deny all;
}
location / {
try_files $uri $uri/ /?$args;
}
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$ last;
rewrite ([a-z_A-Z-\s.+-]+)/([-]+)_([-]+)\.html$ /index.php/Index/shows/catid/$/id/$ last;
rewrite ([a-z_A-Z-\s.+-]+)\.html$ /index.php/Index/jump/catdir/$ last;
break;
}
}
server {
listen ;
root /www/web/test_com/public_html;
ssl on;
ssl_certificate cert/test_com.crt;
ssl_certificate_key cert/test_com.key;
ssl_prefer_server_ciphers on;
ssl_session_timeout 10m;
ssl_protocols TLSv1 TLSv1. TLSv1.;
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
server_name test.com test.com;
if ($host != '***.com')
#注意,这里很严格,if后面要有空格,!=两边都是空格。
{
rewrite ^/(.*)$ https://www.***.com/$1 permanent;
}
if ($scheme = http ) {
return https://www.***.com$request_uri;
}
index index.html index.php index.htm;
error_page /errpage/.html;
error_page /errpage/.html;
error_page /errpage/.html;
error_page /errpage/.html;
location ~ \.php {
fastcgi_pass unix:/tmp/php--cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
set $real_script_name $;
set $path_info $;
}
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
}
location ~ /\.ht {
deny all;
}
location / {
try_files $uri $uri/ /?$args;
}
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$ last;
rewrite ([a-z_A-Z-\s.+-]+)/([-]+)_([-]+)\.html$ /index.php/Index/shows/catid/$/id/$ last;
rewrite ([a-z_A-Z-\s.+-]+)\.html$ /index.php/Index/jump/catdir/$ last;
break;
}
}
nginx ssl pathinfo 伪静态 301 配置文件的更多相关文章
- Nginx/Apache之伪静态设置 - 运维小结
一.什么是伪静态伪静态即是网站本身是动态网页如.php..asp..aspx等格式动态网页有时这类动态网页还跟"?"加参数来读取数据库内不同资料,伪静态就是做url重写操作(即re ...
- nginx + SSL优化配置
nginx + SSL优化配置: #http段添加如下配置项: http { ssl_prefer_server_ciphers on; #设置协商加密算法时,优先使用我们服务端的加密套件,而不是客户 ...
- nginx - ssl 配置 - globelsign ssl
前提: 3个文件 - domain.csr.domain.key.xxx.cer 简述: 1. 本地生成 .key文件 [附件] 2. 再利用key文件,生成csr(certificate Secu ...
- shopnc B2B2C商城 Nginx下开启伪静态
B2B2C商城 Nginx下开启伪静态,伪静态开启后,对系统的SEO极为有利,可以最大限度让商城页面被搜索引擎抓取,但在实际安装中,很多客户在这块都会遇到各种各样的问题. 1. 编辑商城配置文件(da ...
- Nginx SSL TLS部署最佳实践
本文介绍nginx在提供HTTPS时使用的一些其他配置选项. 虽然这些功能有助于优化nginx的SSL和TLS,但这不是一个完整对加固nginx的介绍. 确保您的服务器安全的最佳方法是不仅需要正确的配 ...
- Nginx下wordpress伪静态规则(rewrite)
当我们从apache服务器转向Nginx服务器的时候,它们的伪静态规则就不一样了,所以你熟悉Nginx服务器的伪静态规则,自己写当然也好.但很多网友还是不太了解Nginx服务器的伪静态规则的,而如果你 ...
- nginx支持pathinfo并且隐藏index.php
How To Set Nginx Support PATHINFO URL Model And Hide The /index.php/ 就像这样 The URL before setting lik ...
- 解决NGINX的WORDPRESS伪静态规则失效的问题
解决NGINX的WORDPRESS伪静态规则失效的问题 前两天搬到了EMSVPS的PR线路上,用上了最新的WDCP2.0管理面板,支持多用户管理(我们几个合租的VPS,最需要这个功能了),感觉很不错, ...
- 0109 ubuntu nginx ssl
1. sudo apt-get install openssl libssl-dev # ./configure --with-http_stub_status_module --with-http_ ...
随机推荐
- 在Visualsvn Server上创建svn账号和密码
VisualSVN Server是一个集成的svn服务端工具,是一款svn服务端不可多得的好工具.可以先安装好VisualSVN Server后,运行VisualSVN Server Manger,然 ...
- easyUI datagrid 重复发送URL请求
如果在table属性中配置了URL参数,在初始化datagrid时,会发送一次url请求.或者在js中datagrid{url:''}时,也会自动发送一次url请求. 在初始化datagrid时,我并 ...
- 数据库建模工具 PD的使用
1.1. 数据库建模工具 PD的使用 安装12.5版本,进行破解 PD 是最专业数据建模工具, 是 Sybase 公司一个 产品 PD 提供四种模型文件 PDM 物理数据模型,面向数据库表结构设计,直 ...
- laravel 使用EasyWechat 3分钟完成微信支付(以APP支付为例)
上一篇写了支付宝支付,然后这段时间我又把微信支付给接上了,作为萌新的我还是很有成就感的,哈哈~~好了,该写正事了. 第一步:创建应用及配配置 首先到微信的官方平台注册应用https://pay.we ...
- antd Grid
import { Row, Col } from 'antd'; <Row type="flex" //内容布局(左靠齐,右靠齐,居中) justify="star ...
- January 17 2017 Week 3 Tuesday
You can't shake hands with a clenched fist. 紧握拳头你就无法与他人握手. If you want to shake hands with others, j ...
- 如何玩转Android远控(androrat)
关于WebView中接口隐患与手机挂马利用的引深 看我是怎样改造Android远程控制工具AndroRat 1.修改布局界面 2.配置默认远程ip和端口 3.LauncherActivity修改为运行 ...
- JSTL1.2学习总结
1.0 JSTL的下载 JSTL(JSP Standard Tag Library,JSP标准标签库)是一个不断完善的开放源代码的JSP标签库,是由apache的jakarta小组来维护的.JSTL只 ...
- FBKVOController代码阅读
功能:对kvo机制进行封装,简化使用,简化内存管理: 要素:观察者.被观察者.处理函数. 模式:注册表模式: 机制:对象创建.注册管理.内存管理.处理机制转换: 其它:注册去重: kvo的管理机制:
- BZOJ1770:[USACO]lights 燈(高斯消元,DFS)
Description 貝希和她的閨密們在她們的牛棚中玩遊戲.但是天不從人願,突然,牛棚的電源跳閘了,所有的燈都被關閉了.貝希是一個很膽小的女生,在伸手不見拇指的無盡的黑暗中,她感到驚恐,痛苦與絕望. ...