nginx vhost配置
server
{
listen 80;
server_name crsdemo.my;
index index.html index.htm index.php default.html default.htm default.php;
root /home/xss/www7/crs/public/admin; rewrite_log on; location ~* ^/(upload|static)/.*\.(php|php5)$
{
rewrite "^/(.*)$" /static/405.html break;
} if (!-f $request_filename) {
rewrite ^/$ /index.php last;
rewrite ^/(?!(index\.php|upload|static))(.*)$ /index.php?$1$2 last;
rewrite ^/index.php(.*)$ /index.php?$1 last;
} location ~ \.php$ {
fastcgi_pass 127.0.0.1:9007;
fastcgi_index index.php;
include fastcgi.conf;
} access_log /home/xss/www/log/gjsgzgzpg.log;
error_log /home/xss/www/log/gjsgzgzpg.log notice;
error_log /home/xss/www/log/gjsgzgzpg.log;
}
nginx vhost配置的更多相关文章
- lnmp集成环境tp nginx vhost配置
server { listen 80; server_name xxx; charset utf-8; root /home/wwwroot/axxx/public; index index.html ...
- 在Nginx上配置多个站点
有时候你想在一台服务器上为不同的域名运行不同的站点.比如www.siteA.com作为博客,www.siteB.com作为论坛.你可以把两个域名的IP都解析到你的服务器上,但是没法在Nginx的根目录 ...
- nginx常用配置系列-虚拟主机
本来准备详尽的出一份nginx配置讲解,但nginx功能配置繁多,平常使用中使用最多的一般有: 1. 虚拟主机配置 2. HTTPS配置 3. 静态资源处理 4. 反向代理 ============= ...
- linux下安装nginx与配置
linux系统为Centos 64位 第一步:从http://nginx.org/download/上下载相应的版本(或者wget http://nginx.org/download/nginx-1. ...
- linux-centerOs6.8安装nginx与配置
一:安装nginx 1.安装gcc(命令:yum install gcc)备注:可以输入gcc -v查询版本信息,查看是否自带安装 2.安装pcre(命令:yum install pcre-devel ...
- 【第六课】Nginx常用配置下详解
目录 Nginx常用配置下详解 1.Nginx虚拟主机 2.部署wordpress开源博客 3.部署discuz开源论坛 4.域名重定向 5.Nginx用户认证 6.Nginx访问日志配置 7.Ngi ...
- Nginx SSL配置
一.SSL 原理 ① 客户端( 浏览器 )发送一个 https 请求给服务器② 服务器要有一套证书,其实就是公钥和私钥,这套证书可以自己生成,也可以向组织申请,服务器会把公钥传输给客户端③ 客户端收到 ...
- Nginx(一):linux下安装nginx与配置
linux系统为Centos 64位 准备目录 [root@instance-3lm099to ~]# mkdir /usr/local/nginx [root@instance-3lm099to ~ ...
- 阿里云centOS7.4 nginx: [emerg] "server" directive is not allowed here in /etc/nginx/vhost/xxxxxx.conf:2
里云centOS7.4配置多个站点遇到的问题nginx: [emerg] "server" directive is not allowed here in /etc/nginx/ ...
随机推荐
- ISP-OB, pedestal 以及ISP概述
网上的直接参考资料 1. https://zhuanlan.zhihu.com/p/36896537 2. https://blog.csdn.net/m0_38049850/article/deta ...
- Ubuntu 20.04上通过Wine 安装微信
没有想过会在一个手机软件上花这么多心思,好在今天总算安装成功,觉得可以记录下这个过程,方便他人方便自己. 首先介绍下我使用过的其他方法,希望可以节省大家一些时间: Rambox Pro:因为原理是网页 ...
- 【linux】基础命令一
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mount dir[] device[]umount devic[]maste ...
- 代码格式化工具:clang-format
IDE: Visual Studio Code Language: C/C++ 格式化工具: clang-format 安装 vscode安装扩展C/C++,扩展程序将自动安装clang-format ...
- protoc-c 阅读笔记
以前和山哥做过类似的,最近想起来,抽空又看了下 protoc-c. 山哥做的报文流向: rpc -> lydtree -> motree -> struct 涉及的细节很多 1) l ...
- linux内存优化之手工释放linux内存
先介绍下free命令 Linux free命令用于显示内存状态. free指令会显示内存的使用情况,包括实体内存,虚拟的交换文件内存,共享内存区段,以及系统核心使用的缓冲区等. 语法: free [- ...
- python接口测试之读取配置文件
1.python使用自带的configparser模块用来读取配置文件,配置文件可以为.conf或.ini结尾 在使用前需要先安装该模块,使用pip安装即可 2.新建一个名为a.conf的配置文件 a ...
- ansible通过yum/dnf模块给受控机安装软件(ansible2.9.5)
一,使用yum/dnf模块要注意的地方: 使用dnf软件安装/卸载时,需要有root权限, 所以要使用become参数 说明:刘宏缔的架构森林是一个专注架构的博客,地址:https://www.cnb ...
- centos8平台redis cluster集群搭建(redis5.0.7)
一,规划 redis cluster 1,cluster采用六台redis,3主3从 redis1 : ip: 172.17.0.2 redis2 : ip: 172.17.0.3 red ...
- 第十二章 配置vlan
一.vlan技术简介 1.广播风暴 广播风暴(broadcast storm)简单的讲是指当广播数据充斥网络无法处理,并占用大量网络带宽,导致正常业务不能运行,甚至彻底瘫痪,这就发生了"广播 ...