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

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

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

延伸 · 閱讀

精彩推薦
主站蜘蛛池模板: 成人在线av视频 | 欧美日韩一区二区综合在线视频 | 午夜理论片日本中文在线 | 日本在线亚州精品视频在线 | 国产区香蕉精品系列在线观看不卡 | 女同性互吃奶乳免费视频 | 美女模特被c免费视频 | 免费一级欧美片在线观免看 | 国产一区二区免费在线 | 天若有情1992国语版完整版 | www.最色| 关晓彤被调教出奶水的视频 | 韩剧网3600热播剧 | 护士的小嫩嫩好紧好舒服 | 国产一区精品视频 | 亚洲qvod图片区电影 | 丰满岳乱妇在线观看视频国产 | 色婷婷久久综合中文久久一本` | 日韩欧美国产综合精品 | 91av俱乐部| 国产裸舞福利资源在线视频 | vod国产成人精品视频 | 亚洲成人黄色网址 | 久久视频精品3线视频在线观看 | 2012中文字幕中字视频 | 爽爽窝窝午夜精品一区二区 | 国产成人精品午夜免费 | 日本特级大片 | 九色PORNY丨视频入口 | 国产区成人综合色在线 | 欧美综合在线 | 91香蕉依人综合久久 | 古代双性美人被老糟蹋 | 为什么丈夫插我我却喜欢被打着插 | 免费福利资源站在线视频 | 我的男友是消防员在线观看 | www.爱操 | 免费视频左左视频 | 女人和拘做受全过程免费 | 三级理论在线观看 | 国产在线视频第一页 |