`
cooler1217
  • 浏览: 366326 次
  • 性别: Icon_minigender_1
  • 来自: 长春
社区版块
存档分类
最新评论

php nginx ci 部署nginx.conf

 
阅读更多
user  root;
worker_processes  8;

#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 {
    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  logs/access.log  main;

    client_max_body_size    1000m;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    gzip on;
    gzip_min_length  1k;
    gzip_buffers     4 16k;
    gzip_http_version 1.1;
    gzip_comp_level 6;
    gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png application/javascript;
    gzip_vary on;
    gzip_proxied        expired no-cache no-store private auth;
#gzip_disable        "MSIE [1-6]\.";
    server {
      listen       80;
      server_name  localhost;
      root   /usr/local/nginx/html/jordan;
      index  index.html index.htm index.php index.shtml;
      location / {
      #rewrite ^/$ /index.php last;
      rewrite ^/(?!index\.php|robots\.txt|uploadedImages|resource|images|css|styles|js|static)(.*)$ /index.php/$1 last;
      }
          
      location ~ \.js$ {
         expires 1d;
         root /usr/local/nginx/html/jordan;
      }
      location ~* \.(gif|jpg|jpeg)$ {
         expires 1d;
         root   /usr/local/nginx/html/jordan;
      }

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

      location = /50x.html {
        root   html;
      }

      location ~ ^(.+\.php)(.*)$ 
      {
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_split_path_info ^(.+\.php)(.*)$;
        fastcgi_param        SCRIPT_FILENAME        $document_root$fastcgi_script_name;
        fastcgi_param        PATH_INFO                $fastcgi_path_info;
        fastcgi_param        PATH_TRANSLATED        $document_root$fastcgi_path_info;
        include        fastcgi_params;
        include        fastcgi.conf;
      }

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
      #location ~ \.php$ {
      #  root   /usr/local/nginx/html/ci;
      #  fastcgi_pass   127.0.0.1:9000;
      #  fastcgi_index  index.php;
      #  fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
      #  include        fastcgi_params;
      #  include        fastcgi.conf; 
      #}


    }


# 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;
#    server_name  localhost;

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

#    ssl_session_timeout  5m;

#    ssl_protocols  SSLv2 SSLv3 TLSv1;
#    ssl_ciphers  HIGH:!aNULL:!MD5;
#    ssl_prefer_server_ciphers   on;

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

}
分享到:
评论

相关推荐

    Nginx配置文件nginx.conf详细说明

    在此记录下Nginx服务器nginx.conf的配置文件说明, 部分注释收集与网络. #运行用户 user www-data; #启动进程,通常设置成和cpu的数量相等 worker_processes 1; #全局错误日志及PID文件 error_log /var/log/nginx/...

    windows环境搭建的直播、点播服务器 nginx 1.7.11.3 Gryphon.rar

    已经配置好,下载下来直接启动nginx.exe -c conf\nginx-win-rtmp.conf,就可以拉流hls、rtmp视频流了 搭建一个 ffmpeg+nginx的视频服务器: windows: 参考 ...

    nginx经验总结.rd

    nginx -c /etc/nginx/nginx.conf -s reload 平滑启动 nginx -c /etc/nginx/nginx.conf 启动 nginx -t 配置文件是否正确 ``` 目录: 1. nginx的虚拟主机的配置 2. Nginx的反向代理 3. Nginx的负载均衡 4. ...

    Nginx反向代理proxy_cache_path directive is not allowed错误解决方法

    nginx: [emerg] “proxy_cache_path” directive is not allowed here in /etc/nginx/conf.d/default.conf:29 提示意思“proxy_cache_path指令不被允许”,在官网上查找了相关说明,也没有发现问题,最后看应用范围...

    解析CI即CodeIgniter框架在Nginx下的重写规则

    最近研究CI框架,发现这个框架的路由功能在Nginx下有问题,报404错误,后来在网上查资料,发现需要开启PATH_INFO。在nginx7.16以后貌似就支持PATH_INFO了,只需要在配置文件中开启即可。打开nginx.conf文件,在你的...

    Nginx的nginx.conf配置文件中文注释说明

    代码如下:  #运行用户 ...   #启动进程,通常设置成和cpu的数量相等  worker_processes 1;    #全局错误日志及PID文件 ... #epoll是多路复用IO(I/O Multiplexing)中的一种方式,但是仅用于linux2.6以上内

    ASP.NET Core应用程序部署至生产环境中(CentOS7)

    修改 /etc/nginx/conf.d/default.conf 文件,将文件内容替换为: server { listen 80; location / { proxy_pass http://localhost:5000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; ...

    Nginx服务器Nginx.com配置文件详解

    在此记录下Nginx服务器nginx.conf的配置文件说明, 部分注释收集与网络. #运行用户 user www-data; #启动进程,通常设置成和cpu的数量相等 worker_processes 1; #全局错误日志及PID文件 error_log /var/log/nginx/...

    php使用redis在windows下配置方法

    将redis.conf 拷贝到C:\Program Files\redis-1.3.9-windows下 指定redis的配置文件,如没有指定,则使用默认设置 C:\Program Files\redis-1.3.9-windows>redis-server.exe redis.conf 如下图则开启正常 新开一个...

    Nginx服务器配置HTTPS nginx.config 配置文件(教程)

    目录位置: /usr/local/www/nginx/conf(仅供参考) server { listen 443 ssl; server_name localhost; ssl_certificate server.crt; # cert.pem;... ssl_certificate_key server.key;... ssl_prefer_server_ci

    《GoWeb编程》PHP网站版PHP-For-Go-Web.zip

    RewriteRule (.*)$ /index\.php\?file=$1 [I] [ Nginx ] 通过在Nginx.conf中配置转发规则实现: location / { // …..省略部分代码  if (!-e $request_filename) {  rewrite ^(.*)$ /index....

    128uu酒店分销预订系统 PHP版 v2.1.zip

    如果是nginx独立主机用户请将nginx.conf中的内容复制到您的站点配置中。   程序说明: 1.从底层开始完全的重新设计、构建。并采用国外最先进的ZEND框架,具备极强的扩展性,便于后续各类优秀功能的加入,打造...

    单点登录源码

    各个子系统前台thymeleaf模板,前端资源模块,使用nginx代理,实现动静分离。 > zheng-upms 本系统是基于RBAC授权和基于用户授权的细粒度权限控制通用平台,并提供单点登录、会话管理和日志管理。接入的系统可自由...

    assets-bower-ci:php框架的前端资产管理

    您将看到一个页面,其中包含来自parsed.json link和script 更改assets.json并运行example.js ,重复步骤 1,加载的资产已更改Nginx的为了正确加载字体,您需要为静态文件设置 CORS 标头,这个 conf 文件就是一个...

    fabu.love:应用发布平台类似的fir.im蒲公英,支持检查更新,灰色发布等等。演示地址:https:fabu.apppills.com

    错别字复制图像到 ./截屏 爱发布 ...可以自己部署。 项目前初步分离开发: 前端使用vue + element-ui 初步使用nodejs + koa ...├── fabu_nginx.conf //server端nginx配置文件 ├── screenshots //屏幕截图 ├── ser

    codo-task:基于Tornado实现,系统核心调度,可分散扩展

    任务系统 部署文档 此系统尽量分散安装 修改配置 对设置里面的配置文件进行修改,主要是...create database ` do_task ` default character set utf8mb4 collate utf8mb4_unicode_ci; 初始化表结构 docker exec -ti cod

    event-analytics-server-open:自定义事件统计服务 - 开源代码,仅供参考学习

    所以以下流程无法顺利执行:从 0 到 1 的设计过程,commit 记录pre commit 检查:单元测试、接口测试CI/CD发布到测试机发布上线/回滚运维和监控想了解这些,可去关注我们的《Web 前端架构师》课程,其中都有详细讲解...

    fluentd:Fluentd:统一日志记录层(CNCF下的项目)

    流利的:开源日志收集器特拉维斯CI: 适用于Arm64的Drone CI: 从各种数据源收集事件并将其写入文件,RDBMS,NoSQL,IaaS,SaaS,Hadoop等。 Fluentd可帮助您统一日志记录基础结构(了解有关更多信息)。 一个事件...

    tmux-multiple:创建多个窗格

    c 用于您要调用的命令 -m 参数列表,每个窗格用空格分隔 -g 将命令发送到所有打开的窗格 -p 运行参数 -i 用于安装带有 tmux 配置的脚本安装: $ ./tmux-multi.sh -install安装将需要一个符号链接路径,并将 .tmux....

Global site tag (gtag.js) - Google Analytics