nginx配置笔记
来源:互联网 发布:矩阵相加 编辑:程序博客网 时间:2024/05/29 03:00
1准备
ubuntu 14 , nginx 1.11.5
以wordpress为例,在wordpress中文网下载软件压缩包,解压到某个位置
2配置
假定顶级域名:www.yuming.com,二级域名:sec.yuming.com
wordpress路径:/usr/share/nginx/wordpress
www.yuming.com匹配如下,指向的是wordpress程序
server { listen 80; server_name www.yuming.com; location / { root /usr/share/nginx/wordpress; index index.html index.htm index.php; try_files $uri $uri/ /index.php?$args; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/wordpress; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/share/nginx/wordpress$fastcgi_script_name; include fastcgi_params; }}
sec.yuming.com匹配如下,反向代理tomcat:
server { listen 80; server_name sec.yuming.com; location / { proxy_pass http://localhost:8080; proxy_redirect default; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; }}
0 0
- nginx配置笔记
- Nginx 配置笔记
- nginx配置笔记
- nginx+Ngx_cache_purge配置笔记
- 4.nginx学习笔记:nginx配置虚拟主机
- Nginx学习笔记二 -- nginx的配置
- FastDFS+Nginx安装配置笔记
- nginx笔记, 安装,配置,集群
- FastDFS+Nginx安装配置笔记
- FastDFS+Nginx安装配置笔记
- nginx配置性能优化笔记
- 有关nginx配置的笔记
- 【学习笔记】nginx 配置补充
- Nginx学习笔记1—Nginx(Win32) 配置详解
- Nginx学习笔记1—Nginx(Win32) 配置详解
- nginx 学习笔记--Nginx安装及反向代理配置(简述)
- 2.nginx学习笔记:nginx下的https配置
- 3.nginx学习笔记:nginx配置反向代理服务器
- Collection之List方法和分类
- 模板学习笔记2
- 解读 RtlConvertNtFilePathToWin32FilePath
- 浅析this指针
- C++11 (二)
- nginx配置笔记
- 如何安装SQL Server 2008数据库(带完整图解)
- Struts2中的拦截器interceptor
- openlayers3.14源码学习(1)
- 2python机器学习--SVM(决策树分类算法)
- Hash Function 哈希函数
- 大鱼后传
- 最长递减子序列
- Spring中监听器的详解