配置完rewrite之后重启nginx发现如下错误

"server" directive is not allowed here in*

原因是因为 外部配置的simple.conf没有include到nginx.conf的http{}里面

修改nginx.conf之后解决

linux之"server" directive is not allowed here in的更多相关文章

  1. 阿里云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/ ...

  2. nginx检查报错:nginx: [emerg] "server" directive is not allowed here in

    想检查一个配置文件是否正确,-c 指定之后发现有报错,如下: [root@op-2:~# nginx -t -c /etc/nginx/conf.d/default.conf nginx: [emer ...

  3. [Linux] Ubuntu Server 12.04 LTS 平台上搭建WordPress(Nginx+MySql+PHP) Part II

    接着上一节继续搭建我们的LNMP平台,接下来我们安装PHP相关的服务 sudo apt-get install php5-cli php5-cgi php5-fpm php5-mcrypt php5- ...

  4. [Linux] Ubuntu Server 12.04 LTS 平台上搭建WordPress(Nginx+MySQL+PHP) Part IV

    接下来我们去下载 WorePress 用最新的 3.7.1 下载地址是:http://cn.wordpress.org/wordpress-3.7.1-zh_CN.zip 我们先建立一个文件夹 /va ...

  5. Manually connecting to the Oracle Linux Yum Server

    Manually connecting to the Oracle Linux Yum Server 1. Download and Install Oracle Linux   Note: The ...

  6. Welcome Docker to SUSE Linux Enterprise Server【水平有限,中英对比,求纠错】

      原文:Welcome Docker to SUSE Linux Enterprise Server Lightweight virtualization is a hot topic these ...

  7. linux后台server开发环境的部署配置和验证(nginx+apache+php-fpm+FASTCGI(C/C++))

    linux后台server开发环境部署配置 引言 背景 随着互联网业务的不断增多.开发环境变得越来越复杂,为了便于统一server端的开发部署环境,特制定本配置文档. 使用软件 CentOS 6.3( ...

  8. SUSE Linux Enterprise Server 11 SP1安装图解教程

    一.说明:操作系统:SUSE Linux Enterprise Server 11 SP1下载地址:需要注册才能下载二.安装系统 用启动盘成功引导之后,出现下面的界面 系统运维 温馨提醒:qihang ...

  9. LVS (Linux Virtual Server) 负载均衡

    [大型网站技术实践]初级篇:借助LVS+Keepalived实现负载均衡   一.负载均衡:必不可少的基础手段 1.1 找更多的牛来拉车吧 当前大多数的互联网系统都使用了服务器集群技术,集群即将相同服 ...

随机推荐

  1. git: windows git ssh keys生成

    http://blog.csdn.net/lsyz0021/article/details/52064829 当我们使用github或者bitbucket等仓库时我们有可能需要ssh认证,所以需要生成 ...

  2. Linux下使用autoconf 和 automake 编译简单的HelloWorld

    使用过开源C/C++项目的同学都知道,标准的编译过程已经变成简单的三部曲:./configure /make/make install,使用起来很方便,不像平时自己写代码,要手写一堆复杂的makefi ...

  3. 识别有效的IP地址和掩码并进行分类统

    #include<iostream> #include<stdio.h> #include<string.h> using namespace std; int c ...

  4. c c++怎么判断一个字符串中是否含有汉字

    c c++怎么判断一个字符串中是否含有汉字 (2013-02-05 10:44:23) 转载▼     #include  #include  int main() { char sztext[] = ...

  5. python--安装PIL

    PIL:Python Imaging Library,已经是Python平台事实上的图像处理标准库了.PIL功能非常强大,但API却非常简单易用. 安装PIL 在Debian/Ubuntu Linux ...

  6. Struts2 报 Result 错误

    写的时候犯了个低级错误  struts.xml中 配置result 的时候 没有配置type

  7. freemarker if elseif

    FreeMarker模板 if, else, elseif 指令 : if, else, elseif 语法 <#if condition> ... <#elseif conditi ...

  8. echsop常用模板方法.

    echsop模板遍历文件: {foreach from=$goods_list item=goods} {$goods.name} {/foreach} 不知道为什么ecshop中foreach像个注 ...

  9. 使用Dottrace跟踪代码执行时间

    当自己程序遇到性能问题,比如IIs请求反应缓慢,客户端程序执行缓慢,怎么分析是哪里出了问题呢?dottrace可以帮助.net程序跟踪出代码里每个方法的执行时间,这样让我们更清晰的看出是哪里执行时间过 ...

  10. jsp与php混用的漏洞

    接手一个项目是jsp写的,用起来感觉开发是在太麻烦了.于是新功能就用php写的,jsp.php两者之间相互跳转, 突然一天发现在tomcat的web站下打开php竟然显示了php源码,在php站下看j ...