濮阳杆衣贸易有限公司

主頁(yè) > 知識(shí)庫(kù) > ThinkPHP 在阿里云上的nginx.config配置實(shí)例詳解

ThinkPHP 在阿里云上的nginx.config配置實(shí)例詳解

熱門標(biāo)簽:深圳400電話辦理那家好 百度地圖標(biāo)注飯店位置怎么 清遠(yuǎn)陽(yáng)山400電話號(hào)碼如何申請(qǐng) 施工地圖標(biāo)注怎么做 怎么在高德地圖標(biāo)注行走軌跡 襄陽(yáng)房產(chǎn)電銷機(jī)器人招商 百度地圖標(biāo)注名編輯 安徽移動(dòng)外呼系統(tǒng) 個(gè)性化地圖標(biāo)注在線

具體代碼如下所示:

# For more information on configuration, see:
#  * Official English Documentation: http://nginx.org/en/docs/
#  * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
events {
  worker_connections 1024;
}
http {
  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 /var/log/nginx/access.log main;
  sendfile      on;
  tcp_nopush     on;
  tcp_nodelay     on;
  keepalive_timeout  65;
  types_hash_max_size 2048;
  include       /etc/nginx/mime.types;
  default_type    application/octet-stream;
  # Load modular configuration files from the /etc/nginx/conf.d directory.
  # See http://nginx.org/en/docs/ngx_core_module.html#include
  # for more information.
  include /etc/nginx/conf.d/*.conf;
  server {
    listen    80 default_server;
    listen    [::]:80 default_server;
    server_name _;
    root     /usr/share/nginx/html;
    # Load configuration files for the default server block.
    include /etc/nginx/default.d/*.conf;
    location / {
       #try_files $uri $uri/ /index.php;
       root  /usr/share/nginx/html;
       index index.php index.html index.htm;
       if (!-e $request_filename) {  rewrite ^(.*)$ /index.php?s=$1 last;  break;  }
    }      
    # redirect server error pages to the static page /40x.html
    #
    error_page 404       /404.html;     
    location = /40x.html {
    }
    # redirect server error pages to the static page /50x.html
    #
    error_page  500 502 503 504 /50x.html; 
    location = /50x.html {
    }
    location ~ \.php$ {
    root      /usr/share/nginx/html;
    fastcgi_pass  127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include    fastcgi_params;
    }
    location ~ /\.ht {
    deny all;
    }
  }
}

總結(jié)

以上所述是小編給大家介紹的ThinkPHP 在阿里云上的nginx.config配置實(shí)例詳解,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!

您可能感興趣的文章:
  • Nginx服務(wù)器配置HTTPS nginx.config 配置文件(教程)
  • Nginx配置文件nginx.conf詳細(xì)說(shuō)明
  • Nginx配置文件(nginx.conf)配置詳解(總結(jié))
  • 詳解Nginx服務(wù)器中的nginx.conf配置文件
  • Nginx配置文件nginx.conf的常用配置方法
  • 比較完整的Nginx配置文件nginx.conf常用參數(shù)中文詳解
  • Nginx的nginx.conf配置文件中文注釋說(shuō)明
  • nginx配置文件nginx.conf中文注釋說(shuō)明
  • nginx從編譯安裝到配置文件說(shuō)明中文詳細(xì)介紹

標(biāo)簽:中衛(wèi) 南昌 欽州 阜陽(yáng) 臨夏 延邊 黑河 駐馬店

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《ThinkPHP 在阿里云上的nginx.config配置實(shí)例詳解》,本文關(guān)鍵詞  ThinkPHP,在,阿里,云,上,的,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《ThinkPHP 在阿里云上的nginx.config配置實(shí)例詳解》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于ThinkPHP 在阿里云上的nginx.config配置實(shí)例詳解的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    崇义县| 伊宁县| 清水县| 普洱| 浮山县| 莎车县| 沈丘县| 德州市| 舞阳县| 和静县| 读书| 凤翔县| 怀化市| 翁牛特旗| 桐梓县| 象州县| 沙洋县| 通山县| 渑池县| 怀仁县| 景宁| 方山县| 光山县| 镶黄旗| 土默特左旗| 屯门区| 台北市| 津市市| 盐亭县| 长葛市| 东乡县| 安乡县| 上林县| 海丰县| 繁昌县| 桓仁| 紫云| 威信县| 健康| 枣阳市| 景泰县|