文件:nginx.conf

内容:

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;

events {
    worker_connections  1024;
}

http {
    client_max_body_size 32m;

include       mime.types;
    default_type  application/octet-stream;

#log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

access_log off;
    #access_log  logs/access.log  main;

sendfile        on;
    #tcp_nopush     on;

#keepalive_timeout  0;
    keepalive_timeout  65;

#gzip  on;

server {
        listen       80;
        server_name  localhost;

#charset koi8-r;

#access_log  logs/host.access.log  main;
        
        root E:/www;

location / {
            #root   html;
            index  index.php index.html index.htm;
        }

#error_page  404              /404.html;

# redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php {
        #    root           html;
            fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
            set $real_script_name $fastcgi_script_name;
            set $path_info "";
            if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$")
            {
                set $real_script_name $1;
                set $path_info $2;
            }
            fastcgi_param  SCRIPT_FILENAME  $document_root$real_script_name;
            include        fastcgi_params;
            fastcgi_param SCRIPT_NAME $real_script_name;
            fastcgi_param PATH_INFO $path_info;
        }

# deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }

# another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

#    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

# HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;

#    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

#    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

#    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

#    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

}

以上。

配置php环境的一个nginx.conf的更多相关文章

  1. [原]生产环境下的nginx.conf配置文件(多虚拟主机)

    [原]生产环境下的nginx.conf配置文件(多虚拟主机) 2013-12-27阅读110 评论0 我的生产环境下的nginx.conf配置文件,做了虚拟主机设置的,大家可以根据需求更改,下载即可在 ...

  2. 写一个nginx.conf方便用于下载某个网页的所有资源

    写一个nginx.conf方便用于下载某个网页的所有资源 worker_processes 1; events { worker_connections 1024; } http { include ...

  3. nginx环境下配置nagios-关于nagios配置文件nginx.conf

    接上文:nginx环境下配置nagios-关于nginx.conf 配置如下: ;          location ~ .*\.(php|php5)?$          {            ...

  4. 给大家推荐一个nginx.conf文件格式生成的网站

    特别好用: 根据选择自定义nginx.conf的配置: https://nginxconfig.io/?0.php=false&0.python&php_server=%2Fvar%2 ...

  5. 腾讯云服务器 - 配置JDK环境以及Tomcat+nginx服务器

    安装完ngxin以及fastdfs后,那么jdk和tomcat是肯定要装的,本篇很简单,实在没啥好说的,都是基础,略微带一下,如果是大牛路过可以看看吐槽一下 云服务器上初识环境如果没有选择附带其他软件 ...

  6. nginx.conf 完整的集群配置

    ###############################nginx.conf 整配置############################### #user nobody; # user 主模 ...

  7. nginx.conf 集群完整配置

    ###############################nginx.conf 集群完整配置############################### #user nobody; # user ...

  8. nginx的开机自启、server命令启动、nginx.conf配置

    1.将Nginx设置为开机自动启动 a.当上面6步完成之后,说明安装已经完全成功了,但是每次开机我们面临的一个问题,就是每次都要执行命令(1: cd /usr/local/nginx/sbin/   ...

  9. Nginx 配置日志路径(nginx.conf没有写log路径,所以debug的时候找不到日志)

    缘由:nginx.conf没有写log路径,所以debug的时候找不到日志,遂在conf文件里写入了log路径 Setp1.nginx默认日志路径: /var/log/nginx Setp2.conf ...

随机推荐

  1. Material Design 常用控件

    Material Design Material Design (原质化/材料化设计) 是在2014年Google I/O大会上推出的一套全新的界面设计语言. 意在解决Android平台界面风格不统一 ...

  2. 重新学习Java的开始~

    安装jdk的步骤及解释已经在这篇文章中详细阐述了,如下: http://www.cnblogs.com/godtrue/p/4338323.html 1.如何安装库源文件--摘自coreJava 库源 ...

  3. SpringCloud教程 | 第三篇: 服务消费者(Feign)

    上一篇文章,讲述了如何通过RestTemplate+Ribbon去消费服务,这篇文章主要讲述如何通过Feign去消费服务.一.Feign简介 Feign是一个声明式的伪Http客户端,它使得写Http ...

  4. struggle in the ACM(一)

    struggle in the ACM(一) 2018/11/3 成为一名ACMer以后,第一次参加ACM正式比赛,果然是打铁了~ 回想起整场比赛的前前后后,其实拿到现在这个成绩,真的是情理之中却也是 ...

  5. StringBuild使用与原理

    StringBuild的使用: 1.创建: StringBuilder sb=new StringBuilder(); StringBuilder sb=new StringBuilder(200); ...

  6. Hangover POJ - 1003

    How far can you make a stack of cards overhang a table? If you have one card, you can create a maxim ...

  7. js 快速将字符串数组 转化为 数字数组(互换)

    转载于   这里 var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]; arr.map(String); //结果: ['1', '2', '3', '4', '5', '6' ...

  8. 白盒测试实践-day02

    一.任务进展情况 小组分工完成后,了解findbugs的使用过程,以及junit的测试步骤. 二.存在的问题 由于对单元测试不是太了解,导致无法进行测试. 三.解决方法 看mooc上面的视频,了解测试 ...

  9. 架构.Net 到 Linux

    nginx + .net core + mysql + radis + rabbitmq

  10. 【Java】递归递推的应用

    利用阶乘公式来计算组合式: 程序设计思想: 根据公式来计算组合数的大小,从键盘输入n,k的值,设计一个计算阶乘的大小,如果输入的数a为1或0,则直接return 1,否则运用递归,计算a-1的阶乘,直 ...