# 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配置的更多相关文章

  1. 阿里云上,Ubuntu下配置Nginx,在tomcat中加了https协议就不可以了

    问题 阿里云上,Ubuntu服务器,本来部署的是tomcat,并且使用了https 协议.后来为了静态资源分离集成了 nginx,nginx代理跳转到 tomcat.刚开始直接访问http 网址发现, ...

  2. 在阿里云上搭建nginx + ThinkPHP 的实践

    作为一个程序猿,理应用linux系统来作为平时的工作机环境,哎,之前倒是用过一段时间的linux,可惜后来换了本本,后来竟然没有保持,嗷嗷后悔中... 废话不多说,大家用windows的理由都一样,但 ...

  3. 阿里云linux的nginx下面配置多站点

    假设有服务器ip为 114.214.85.35 域名1为  www.jieshendada.cn 域名2为 www.jieshenxiaoxiao.cn 1.首先打开nginx域名配置文件存放目录:/ ...

  4. python web开发c6——阿里云上ubuntu+flask+gunicorn+nginx服务器部署(一)简单测试

    简述 Nginx在服务器部署中的作用 请求通过Nginx实现反向代理,将请求提交给代理服务器.本文中只用了一台服务器,所以是代理到本机. gunicorn的作用 作为服务器代码的容器.接收Nginx的 ...

  5. thinkphp项目阿里云ECS服务器部署

    [日记]thinkphp项目阿里云ECS服务器部署   项目本地开发告一段落.准备上传到服务器上测试 技术组成 thinkphp+mysql+阿里ECS  代码管理方式git 一.阿里ECS服务器配置 ...

  6. 云计算之路-阿里云上:从ASP.NET线程角度对“黑色30秒”问题的全新分析

    在这篇博文中,我们抛开对阿里云的怀疑,完全从ASP.NET的角度进行分析,看能不能找到针对问题现象的更合理的解释. “黑色30秒”问题现象的主要特征是:排队的请求(Requests Queued)突增 ...

  7. 阿里云服务器Linux CentOS安装配置(八)nginx安装、配置、域名绑定

    阿里云服务器Linux CentOS安装配置(八)nginx安装.配置.域名绑定 1.安装nginx yum -y install nginx 2.启动nginx service nginx star ...

  8. 从运维的角度分析使用阿里云数据库RDS的必要性--你不应该在阿里云上使用自建的MySQL/SQL Server/Oracle/PostgreSQL数据库

    开宗明义,你不应该在阿里云上使用自建的MySQL or SQL Server数据库,对了,还有Oracle or PostgreSQL数据库. 云数据库 RDS(Relational Database ...

  9. 在阿里云 ECS 搭建 nginx https nodejs 环境(二、https)

    在阿里云 ECS 搭建 nginx https nodejs 环境(二) 这次主要内容是 如何在 ubuntu 的nginx 下配置 二级域名. 一. 域名解析 首先你需要去到你的 域名服务商那边 进 ...

随机推荐

  1. 机器学习笔记,使用metrics.classification_report显示精确率,召回率,f1指数

    sklearn中的classification_report函数用于显示主要分类指标的文本报告.在报告中显示每个类的精确度,召回率,F1值等信息. 主要参数: y_true:1维数组,或标签指示器数组 ...

  2. java泛型中<? super String>和<? extends String> 的区别

    (1)<? super String> is any class which is a superclass of String (including String itself). (I ...

  3. 负数在计算机中的表示 Byte-128

    本文转载: http://blog.csdn.net/njuitjf/article/details/4585247 原码:将一个整数,转换成二进制,就是其原码.如单字节的5的原码为:0000 010 ...

  4. 安全运维之:网络实时流量监测工具iftop

    网络管理是基础运维中一个很重要的工作,在看似平静的网络运行中,其实暗流汹涌,要保证业务系统稳定运行,网络运维者必须要了解网络的流量状态.各个网段的使用情形,带宽的利用率.网络是否存在瓶颈等,同时,当网 ...

  5. vue遍历数据及字典的方法

    数组:数值<ul id="example-1">   <li v-for="item in items">     {{ item.me ...

  6. JavaScript:属性的操作

    一.属性的设置和获取 1.属性的设置和获取主要有两种方式: <!DOCTYPE html> <html lang="en"> <head> &l ...

  7. Android开发-httpclient兼容性问题

    据说android 6.0之后已经将Apache Http Client移出SDK,build时出现“Unable to find optional library: org.apache.http. ...

  8. PHP判断字符串的包含

    PHP语言是一个功能强大的嵌入式HTML脚本语言,它的易用性让许多程序员选择使用.PHP判断字符串的包含,可以使用PHP的内置函数strstr,strpos,stristr直接进行判断.也可以通过ex ...

  9. 关于使用QTcpSocket的一些总结

    QTcpSocket类的方法connectToHost会泄露内存,即使把调用这个方法的QTcpSocket实例delete掉,内存也不会释放!反复connectToHost会导致段错误,十分危险.必须 ...

  10. Deep Residual Learning for Image Recognition这篇文章

    作者:何凯明等,来自微软亚洲研究院: 这篇文章为CVPR的最佳论文奖:(conference on computer vision and pattern recognition) 在神经网络中,常遇 ...