nginx typecho config
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
# Default server configuration
#
server {
listen 80 default_server;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;
root /app/typecho;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html index.php;
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
# try_files $uri $uri/ =404;
# try_files $uri /index.html index.php;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ .*\.php(\/.*)*$ {
include snippets/fastcgi-php.conf;
fastcgi_param SCRIPT_FILENAME /app/typecho$fastcgi_script_name;
# With php7.0-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# With php7.0-fpm:
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
server {
listen 89;
server_name _;
root /var/www/example.com;
index index.html;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8989;
}
}
nginx typecho config的更多相关文章
- brew: Nginx https config
下载安装Brew: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/mas ...
- Nginx反向代理,负载均衡,redis session共享,keepalived高可用
相关知识自行搜索,直接上干货... 使用的资源: nginx主服务器一台,nginx备服务器一台,使用keepalived进行宕机切换. tomcat服务器两台,由nginx进行反向代理和负载均衡,此 ...
- Nginx反向代理部署指南
一.反向代理 我们都知道,80端口是web服务的默认端口,其他主机访问web服务器也是默认和80端口进行web交互,而一台服务器也只有一个80端口,这是约定俗成的标准. 我们来看下面两个场景: 1.服 ...
- Nginx 反向代理、负载均衡、页面缓存、URL重写及读写分离详解
转载:http://freeloda.blog.51cto.com/2033581/1288553 大纲 一.前言 二.环境准备 三.安装与配置Nginx 四.Nginx之反向代理 五.Nginx之负 ...
- nginx服务傻瓜搭建
nginx服务傻瓜搭建 安装步骤: 一.先准备好相关源码包和程序包,如下图 所有包都在云服务器的/src目录下. 二.安装 1.安装nginx服务器,支持vod stream.fileupload c ...
- nginx+php-fpm+mysql分离部署详解
相信大家将这三者部署到同一台主机应该已经不陌生了,今天在这里,给大家演示一下如何将三者部署到三台主机上. 实验系统:CentOS 6.6_x86_64 实验前提:大部分软件使用编译安装,请提前准备好编 ...
- nginx-(/etc/init.d/nginx)启动脚本
#!/bin/bash #nx Startup script for the Nginx HTTP Server # it is v. version. # chkconfig: - # descri ...
- linux下 nginx、php-fpm、mysql 开机自启动
1.分别为每个编写shell脚本放入/etc/init.d下,添加service服务 2.把每个service服务加入到chkconfig列表 这里我们以php-fpm为例说明下步骤: php-fpm ...
- Linux(Centos)之安装Nginx及注意事项
1.Nginx的简单说明 a. Nginx是一个高性能的HTTP和反向代理服务器,也是一个IMAP/POP3/SMTP服务器,期初开发的目的就是为了代理电子邮件服务器室友:Igor Sysoev开发 ...
随机推荐
- 升级tableau版本
下载地址: https://www.tableau.com/zh-cn/support/releases 2018以后的版本升级:https://help.tableau.com/current/se ...
- 【Linux 网络编程】MTU(Maximum Transmission Uint)
(1)以太网和IEEE802.3对数据帧的长度都是有限制的,其最大分别是1500和1492字节,成为MTU. (2)如果IP层有一个数据要传输,而且数据的长度比链路层的MTU要大,那么IP层就要进行分 ...
- Android事件监听(二)——点击鼠标事件
Button.ImageButton事件监听(setOnClickListener) 方法一:通过匿名内部类实现 代码如下: package com.note.demo2; import androi ...
- 360度3D 旋转插件
Circlr插件是一款基于jQuery的可以对图片进行360度全方位旋转展示的插件.Circlr通过按一定角度规律拍摄的产品图片,制作出可以使用鼠标拖动.鼠标滚轮和移动触摸来进行图片逐帧旋转的效果.比 ...
- iframe 页面嵌套
由于目前项目基础界面,业务逻辑一样,只是细微有所差别.因而使用iframe来进行定制化处理. 如何来区分不同需求不同页面呢? 最初是想通过url携带参数来进行区分,但是随着需求变多,定制化也越来越细微 ...
- 企业面试题|最常问的MySQL面试题集合(一)
问题1:char.varchar的区别是什么?varchar是变长而char的长度是固定的.如果你的内容是固定大小的,你会得到更好的性能. 问题2: TRUNCATE和DELETE的区别是什么?DEL ...
- 手把手 教你把H5页面打造成windows 客户端exe 软件
序言: 好久没有更新博客了,最近在工作中碰到这种需求,由于没有做过,中间碰到好多坑,最后在一位贵人帮助的情况下,最终还是搞定了. 第一步,先安装 cefpython3 pip install cefp ...
- 【转载】Django自带的注册登陆功能
1.登陆 知识点: a.auth.authenticate(username=name值, password=password值) 验证用户名和密码 b.auth.login(request, use ...
- Android多渠道打包且根据不同产品打包不同的assets资源目录
因为项目中存在多种环境,既要区分bebug与release版本,release又要区分测试环境与生产上线环境,每次打包都得浪费不少的等待时间:并且哪个版本有问题还得去切换环境一个个打包,关键是还得牢记 ...
- 状态码是canceled
timeout : 1000 给ajax配置如上属性 $.ajax({ type:"post", url:"pro/savePro", timeout : 10 ...