码迷,mamicode.com
首页 > 其他好文 > 详细

搭建lnmp环境,nginx的配置文件/etc/nginx/nginx.conf

时间:2018-06-08 18:30:20      阅读:1524      评论:0      收藏:0      [点我收藏+]

标签:TE   class   type   http   sha   local   ram   cal   serve   

#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 {
    include mime.types;
    default_type application/octet-stream;

    sendfile on;

    keepalive_timeout 65;

    server {
        listen 80;
        server_name localhost;

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

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
            root html;
        }

        location ~ \.php$ {
            root           /usr/share/nginx/html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /usr/share/nginx/html$fastcgi_script_name;   
            include        fastcgi_params;
        }
    }
}

  

搭建lnmp环境,nginx的配置文件/etc/nginx/nginx.conf

标签:TE   class   type   http   sha   local   ram   cal   serve   

原文地址:https://www.cnblogs.com/heyongzhen/p/9157023.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!