- ubuntu12.04环境下使用kvm ioctl接口实现最简单的虚拟机
- Ubuntu 通过无线网络安装Ubuntu Server启动系统后连接无线网络的方法
- 在Ubuntu上搭建网桥的方法
- ubuntu 虚拟机上网方式及相关配置详解
CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界.
这篇CFSDN的博客文章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 。
最后此篇关于ThinkPHP 在阿里云上的nginx.config配置实例详解的文章就讲到这里了,如果你想了解更多关于ThinkPHP 在阿里云上的nginx.config配置实例详解的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。
任何人都可以详细说明用途是什么(何时使用)asp.net web应用中的web.config,web.config.debug,web.config.release文件?? 最佳答案 它是用于更改调试
我正在尝试创建一个 nuget 包,它将添加一个 DLL 并在正确的配置文件中配置它。该包可用于控制台/表单应用程序或 Web 应用程序,因此我想更新相应的配置文件,app.config 或 web.
已结束。此问题不符合 Stack Overflow guidelines .它目前不接受答案。 关闭 9 年前。 有关您编写的代码问题的问题必须在问题本身中描述具体问题 - 并包含有效代码 以重现它。
我正在开发一个 MVCPortlet。我的 view.jsp 中有一个链接,它调用 liferay 中 portlet 类中的一个方法。 ">Comlex This is the Refahi
我一直在尝试了解如何使用不同的配置文件,我刚刚发现 this link这非常有帮助。唯一的问题是,似乎只有在“发布”解决方案时才会考虑转换,而如果您现在只是进行通用调试或运行,则不会考虑转换。 通常这
我想处理我的 jsx 代码,所以我像这样编写 webpakc.config.js: { test: /\.js$/, loaders: ['react-hot', 'babel-loa
我正在使用 Web.Config 转换将我的应用程序部署到 Azure。我的服务中还有 2 个站点,一个公共(public)网站和一个私有(private) WCF 站点端点。我正在部署multipl
我正在使用 spring security 4.2.5.RELEASE 和 spring 4.3.16.RELEASE我的 XML 配置工作正常,如下所示
config.json 和 config.js 之间有什么区别?我必须同时使用两者吗?我什么时候需要使用其中之一? (https://docs.strongloop.com/display/publi
我运行了 Doctrine 控制台工具: $ php vendor/doctrine/orm/bin/doctrine orm:schema-tool:create --dump-sql 我得到了这个
我正在尝试将 Doctrine ORM 与 Silex 一起使用,但由于缺乏一致的文档,我发现这是一种完全令人沮丧的体验。 当我在控制台运行 vendor/bin/doctrine 时,我得到以下输出
我需要在 web.config 中的多个 WCF 服务中切换出一个 IP 地址。使用 web.config 转换,除了通过 xpath 指定每个地址之外,还有什么方法可以创建搜索和替换语句。例如。对于
我使用来自Ubuntu 14.04的tmux(tmux 1.8)。 我想通过~/.tmux.conf对其进行一些配置。但是无论我在该文件中设置的内容如何,tmux session 都相同。然后,我
嗨,我正在尝试将我的域别名重定向到一个域。 我目前有这个规则 当别名前面没有 www 时它工作得很好.. 我怎么说重定向所有不等于这个域的 谢
我的 Web 配置中有以下 XML,在 Release模式下,我需要根据其子项的名称属性删除 dependentAssembly 部分:assemblyIdentity。我在这里尝试了答案:xdt t
我正在为 web.config 文件寻找一个轻量级的文本编辑器,它具有颜色语法突出显示(如在 Visual Studio 中)。 有什么建议? 最佳答案 您可以使用 Notepad++ .当您使用 w
ImagePicker This plugin allows selection of multiple images from the camera roll
ImagePicker This plugin allows selection of multiple images from the camera roll
如果我有一个 Web 应用程序(有它自己的 web.config )和一个它使用的 .dll 恰好有它自己的 app.config 发生冲突时哪个设置文件会胜出? 最佳答案 不,您不会有任何冲突,因为
问题描述: 我正在尝试在 bash 脚本中使用终止符,但我不断收到一条错误消息,指出没有这样的文件或目录:~/.config/terminator/config .并防止终端在屏幕上弹出。但是,当我在
我是一名优秀的程序员,十分优秀!