nginx配置文件

 
更多
#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;

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

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  25;

    gzip  on; ##gzip压缩

    server {
        listen       80 default;
        server_name  localhost;
            index  index.php index.html index.htm;
            root   /www/default;//默认根目录
            location ~ \.php$ {
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                include  fastcgi.conf;
            }
    }

  include vhost/*.conf;//载入虚拟主机配置文件
}

打赏

本文固定链接: https://www.cxy163.net/archives/884 | 绝缘体

该日志由 绝缘体.. 于 2013年03月21日 发表在 Linux 分类下,
原创文章转载请注明: nginx配置文件 | 绝缘体

报歉!评论已关闭.