憶の年

赚钱宝安装nginx
安装nginx/opt/bin/opkg install nginx 修改配置文件vi /opt/etc/ngin...
扫描右侧二维码阅读全文
25
2015/09

赚钱宝安装nginx

安装nginx

/opt/bin/opkg install nginx

修改配置文件

vi /opt/etc/nginx/nginx.conf

nginx.conf内容

user  nobody;
worker_processes  1;

#error_log  /opt/var/log/nginx/error.log;
#error_log  /opt/var/log/nginx/error.log  notice;
#error_log  /opt/var/log/nginx/error.log  info;

#pid        /opt/var/run/nginx.pid;


events {
    worker_connections  64;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    autoindex on;                         
    autoindex_exact_size off;                                                 
    autoindex_localtime off;    
    charset utf-8,gbk;      
    server_names_hash_bucket_size 128;
    client_header_buffer_size 32k;
    large_client_header_buffers 4 32k;
    client_max_body_size 8m;
    limit_zone one $binary_remote_addr 32k;
    #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  /opt/var/log/nginx/access.log;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;
                                                 
  server {
        listen       8088;
        server_name   localhost;
        root  /media/mmcblk0p5;
       index  index.html index.htm;
        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_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }
}
}

重启nginx

/opt/sbin/nginx -s  reload 

 
最后修改:2018 年 10 月 07 日 09 : 25 PM

发表评论