thinkphp 在阿里云上的nginx.config配置
# 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配置的更多相关文章
- 阿里云上,Ubuntu下配置Nginx,在tomcat中加了https协议就不可以了
问题 阿里云上,Ubuntu服务器,本来部署的是tomcat,并且使用了https 协议.后来为了静态资源分离集成了 nginx,nginx代理跳转到 tomcat.刚开始直接访问http 网址发现, ...
- 在阿里云上搭建nginx + ThinkPHP 的实践
作为一个程序猿,理应用linux系统来作为平时的工作机环境,哎,之前倒是用过一段时间的linux,可惜后来换了本本,后来竟然没有保持,嗷嗷后悔中... 废话不多说,大家用windows的理由都一样,但 ...
- 阿里云linux的nginx下面配置多站点
假设有服务器ip为 114.214.85.35 域名1为 www.jieshendada.cn 域名2为 www.jieshenxiaoxiao.cn 1.首先打开nginx域名配置文件存放目录:/ ...
- python web开发c6——阿里云上ubuntu+flask+gunicorn+nginx服务器部署(一)简单测试
简述 Nginx在服务器部署中的作用 请求通过Nginx实现反向代理,将请求提交给代理服务器.本文中只用了一台服务器,所以是代理到本机. gunicorn的作用 作为服务器代码的容器.接收Nginx的 ...
- thinkphp项目阿里云ECS服务器部署
[日记]thinkphp项目阿里云ECS服务器部署 项目本地开发告一段落.准备上传到服务器上测试 技术组成 thinkphp+mysql+阿里ECS 代码管理方式git 一.阿里ECS服务器配置 ...
- 云计算之路-阿里云上:从ASP.NET线程角度对“黑色30秒”问题的全新分析
在这篇博文中,我们抛开对阿里云的怀疑,完全从ASP.NET的角度进行分析,看能不能找到针对问题现象的更合理的解释. “黑色30秒”问题现象的主要特征是:排队的请求(Requests Queued)突增 ...
- 阿里云服务器Linux CentOS安装配置(八)nginx安装、配置、域名绑定
阿里云服务器Linux CentOS安装配置(八)nginx安装.配置.域名绑定 1.安装nginx yum -y install nginx 2.启动nginx service nginx star ...
- 从运维的角度分析使用阿里云数据库RDS的必要性--你不应该在阿里云上使用自建的MySQL/SQL Server/Oracle/PostgreSQL数据库
开宗明义,你不应该在阿里云上使用自建的MySQL or SQL Server数据库,对了,还有Oracle or PostgreSQL数据库. 云数据库 RDS(Relational Database ...
- 在阿里云 ECS 搭建 nginx https nodejs 环境(二、https)
在阿里云 ECS 搭建 nginx https nodejs 环境(二) 这次主要内容是 如何在 ubuntu 的nginx 下配置 二级域名. 一. 域名解析 首先你需要去到你的 域名服务商那边 进 ...
随机推荐
- C语言 · 瓷砖铺放
算法训练 瓷砖铺放 时间限制:1.0s 内存限制:512.0MB 锦囊1 递归或递推. 问题描述 有一长度为N(1<=N<=10)的地板,给定两种不同瓷砖:一种长 ...
- maven jar包上传到服务器
maven jar包上传到服务器时出现pom文件没有上传上去,致使该jar包再被使用的时候没有依赖,jar包调用出错 解决办法,将pom文件一起deploy上去 mvn deploy:deploy-f ...
- HashSet与TreeSet 区别
HashSetHashSet有以下特点 不能保证元素的排列顺序,顺序有可能发生变化 不是同步的 集合元素可以是null,但只能放入一个null当向HashSet集合中存入一个元素时,HashSe ...
- 基于Zookeeper的分步式队列系统集成案例
基于Zookeeper的分步式队列系统集成案例 Hadoop家族系列文章,主要介绍Hadoop家族产品,常用的项目包括Hadoop, Hive, Pig, HBase, Sqoop, Mahout, ...
- PHP开发安全问题总结
php给了开发者极大的灵活性,但是这也为安全问题带来了潜在的隐患,近期需要总结一下以往的问题,在这里借翻译一篇文章同时加上自己开发的一些感触总结一下. 简介 当开发一个互联网服务的时候,必须时刻牢记安 ...
- orcale的over的使用
--------------------------- 建表 --------------------------- create table test_user( id VARCHAR2(12), ...
- Java设计模式(2)单态模式(Singleton模式)
定义:Singleton模式主要作用是保证在Java应用程序中,一个类Class只有一个实例存在. 在很多操作中,比如建立目录 数据库连接都需要这样的单线程操作. 还有,singleton能够被状态化 ...
- css小贴士备忘录
前言:在CSS的学习实践过程中,我经常遗忘一些貌似常用的代码,为了能够强化记忆特在此作归纳整理并将陆续增删,以备即时查阅.但愿今后能遇到问题及时解决,牢牢记住这些奇怪的字符们. 一.关于段落文本强制对 ...
- 反编译CMD命令
1.反XML命令 E:\HuaWei Tools\android\apktool-install-windows-r04-brut1 java -jar AXMLPrinter2.jar guide ...
- Data source rejected establishment of connection, message from server: "Too many connections"
详细错误信息: Caused by: com.MySQL.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Data source ...