一区二区三区在线-一区二区三区亚洲视频-一区二区三区亚洲-一区二区三区午夜-一区二区三区四区在线视频-一区二区三区四区在线免费观看

服務器之家:專注于服務器技術及軟件下載分享
分類導航

PHP教程|ASP.NET教程|Java教程|ASP教程|編程技術|正則表達式|C/C++|IOS|C#|Swift|Android|VB|R語言|JavaScript|易語言|vb.net|

服務器之家 - 編程語言 - PHP教程 - ThinkPHP 在阿里云上的nginx.config配置實例詳解

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

2021-07-01 16:55張揚個性,敢為天下先 PHP教程

這篇文章主要介紹了ThinkPHP 在阿里云上的nginx.config配置實例詳解,需要的朋友可以參考下

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

具體代碼如下所示:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# 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;
    }
  }
}

總結

以上所述是小編給大家介紹的ThinkPHP 在阿里云上的nginx.config配置實例詳解,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對服務器之家網站的支持!

原文鏈接:http://www.cnblogs.com/zgaspnet/archive/2017/10/10/7646469.html

延伸 · 閱讀

精彩推薦
主站蜘蛛池模板: 久久视频精品3线视频在线观看 | 亚洲视频在线一区二区三区 | 好逼天天有| 日韩一卡2卡3卡新区网站 | 欧美伦理影院 | 169pp美女| 热99re国产久热在线 | 午夜爱情动作片P | 91制片厂制作传媒破解版免费 | 天天做日日做 | 国产日本久久久久久久久婷婷 | 成年人福利视频 | 香蕉tv国产在线永久播放 | 骚虎tv| 3d蒂法精品啪啪一区二区免费 | les在宿舍吃她奶 | 亚洲国产AV一区二区三区四区 | 精品国产精品人妻久久无码五月天 | 亚洲国产在线观看免费视频 | 1717国产精品视频免费 | 亚洲老头与老太hd | 日韩精品免费一级视频 | 国产成人综合亚洲亚洲欧美 | 成年人网站免费在线观看 | 久久99国产精品二区不卡 | 日本肥熟| 视频在线91 | 强女明星系列小说 | 99视频九九精品视频在线观看 | 亚洲精品乱码蜜桃久久久 | 国产精品亚洲午夜一区二区三区 | 欧美久草在线 | 亚洲第一页综合 | 亚洲精品一区制服丝袜 | 日韩精品免费一区二区三区 | 亚洲精品午夜级久久久久 | 精品国产乱码久久久久久免费流畅 | 亚洲午夜精品久久久久 | 精品亚洲一区二区三区在线播放 | 国产特黄a级在线视频 | 国产日产国无高清码2020 |