国产xxxx99真实实拍_久久不雅视频_高清韩国a级特黄毛片_嗯老师别我我受不了了小说

資訊專欄INFORMATION COLUMN

linux nginx.conf 配置

zorpan / 2134人閱讀

摘要:文件配置域名重定向配置配置默認訪問文件修改為定義的名稱查找文件夾或者文件命令例如

1.conf文件

server {
    listen       80;
    server_name  mmy.109.com;
    root   /data/www/mmy.nginx.com;

    #access_log  logs/host.access.log  main;

    # 配置域名重定向
    #if ($host != "www.jt018.com" ) {
    #    rewrite ^/(.*)$ http://www.yphp.cn/$1 permanent;
    #}

    location / {

        # 配置rewrite
        if (!-e $request_filename) {
            rewrite  ^(.*)$  /index.php?$1  last;
            break;
        }

        # include  /usr/local/nginx/html/yphp/.htaccess;
        # rewrite ^/(.+)/(.+)[/]?$ /index.php?m=$1&a=$2 last;

        # 配置默認訪問文件
        index default.php index.html index.php 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;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ .php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_intercept_errors on;
        # fastcgi_pass   phpServer;    # 修改為upstream定義的名稱
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

}

2.nginx.conf

user www www;
worker_processes auto;

error_log /data/logs/error_nginx.log crit;
pid /var/run/nginx.pid;
worker_rlimit_nofile 51200;

events {
    use epoll;
    worker_connections 51200;
    multi_accept on;
    }

http {
    include mime.types;
    default_type application/octet-stream;
    server_names_hash_bucket_size 128;
    client_header_buffer_size 32k;
    large_client_header_buffers 4 32k;
    client_max_body_size 1024m;
    sendfile on;
    tcp_nopush on;
    keepalive_timeout 120;
    server_tokens off;
    tcp_nodelay on;

    fastcgi_connect_timeout 300;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;
    fastcgi_buffer_size 64k;
    fastcgi_buffers 4 64k;
    fastcgi_busy_buffers_size 128k;
    fastcgi_temp_file_write_size 128k;

    #Gzip Compression
    gzip on;
    gzip_buffers 16 8k;
    gzip_comp_level 6;
    gzip_http_version 1.1;
    gzip_min_length 256;
    gzip_proxied any;
    gzip_vary on;
    gzip_types
        text/xml application/xml application/atom+xml application/rss+xml application/xhtml+xml image/svg+xml
        text/javascript application/javascript application/x-javascript
        text/x-json application/json application/x-web-app-manifest+json
        text/css text/plain text/x-component
        font/opentype application/x-font-ttf application/vnd.ms-fontobject
        image/x-icon;
    gzip_disable "MSIE [1-6].(?!.*SV1)";

    #If you have a lot of static files to serve through Nginx then caching of the files" metadata (not the actual files" contents) can save some latency.
    open_file_cache max=1000 inactive=20s;
    open_file_cache_valid 30s;
    open_file_cache_min_uses 2;
    open_file_cache_errors on;

######################## default ############################
# server{
#    listen 80;
#    server_name mmy.109.com;
#    index index.html index.htm index.php;
#    root /data/www/mmy.nginx.com;
#
#    location ~ .php$ {
#        include fastcgi_params;
#        fastcgi_pass 127.0.0.1:9000;
#        fastcgi_index index.php;
#        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#    }
#
#}
########################## vhost #############################
include vhost/*.conf;
}

3.linux查找文件夾或者文件命令

例如:
find / -name nginx.conf
find /-name mysql

文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請注明本文地址:http://specialneedsforspecialkids.com/yun/39362.html

相關(guān)文章

  • 虛擬機Linux Centos7搭建web環(huán)境(LNMP)

    摘要:本文內(nèi)容是,如何在下快速搭建環(huán)境。虛擬機實體機環(huán)境都可以。按照提示,輸入。 本文內(nèi)容是,如何在Linux centos7下快速搭建LNMP環(huán)境。虛擬機、實體機環(huán)境都可以。另外,安裝教程參考的是,下面這篇文章進行文字排版和內(nèi)容擴充,感謝hcchanqing作者。CentOS6.2 yum安裝配置LNMP服務(wù)器(Nginx+PHP+MySQL) 特別提醒:本文系統(tǒng)用的Centos7,是7!...

    Enlightenment 評論0 收藏0
  • 虛擬機Linux Centos7搭建web環(huán)境(LNMP)

    摘要:本文內(nèi)容是,如何在下快速搭建環(huán)境。虛擬機實體機環(huán)境都可以。按照提示,輸入。 本文內(nèi)容是,如何在Linux centos7下快速搭建LNMP環(huán)境。虛擬機、實體機環(huán)境都可以。另外,安裝教程參考的是,下面這篇文章進行文字排版和內(nèi)容擴充,感謝hcchanqing作者。CentOS6.2 yum安裝配置LNMP服務(wù)器(Nginx+PHP+MySQL) 特別提醒:本文系統(tǒng)用的Centos7,是7!...

    Cristic 評論0 收藏0

發(fā)表評論

0條評論

zorpan

|高級講師

TA的文章

閱讀更多
最新活動
閱讀需要支付1元查看
<