nginx.conf中配置laravel框架站点
nginx.conf配置如下:
user nginx nginx;
worker_processes 4;
error_log logs/error.log error;
pid logs/nginx.pid;
worker_rlimit_nofile 102400;
events {
use epoll;
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_format gzip '$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" "$gzip_ratio"';
access_log /spool/logs/nginx-access.log gzip buffer=32k;
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
#keepalive_timeout 65;
tcp_nopush on;
tcp_nodelay on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 256k;
fastcgi_buffers 16 256k;
fastcgi_busy_buffers_size 512k;
fastcgi_temp_file_write_size 512k;
server_names_hash_bucket_size 128;
## Start: Size Limits & Buffer Overflows ##
client_body_buffer_size 1K;
client_header_buffer_size 1k;
client_max_body_size 2m;
large_client_header_buffers 4 2m;
## END: Size Limits & Buffer Overflows ##
## Start: Timeouts ##
client_body_timeout 10;
client_header_timeout 10;
keepalive_timeout 5 5;
send_timeout 10;
## End: Timeouts ##
gzip on;
gzip_min_length 1k;
gzip_buffers 8 32k;
gzip_http_version 1.1;
gzip_comp_level 3;
gzip_types text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/json application/atom+xml;
gzip_vary on;
server {
listen 80;
server_name beta.linda.funshion.com;
access_log logs/linda.access.log gzip buffer=32k;
error_log logs/linda.error.log;
set $root_path '/var/www/linda040/public';
root $root_path;
index index.php index.html index.htm;
try_files $uri $uri/ @rewrite;
location @rewrite {
rewrite ^/(.*)$ /index.php?_url=/$1;
}
location ~ \.php {
fastcgi_pass unix:/tmp/php-fpm.socket;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_index /index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
root $root_path;
}
location ~ /\.ht {
deny all;
}
}
}
nginx.conf中配置laravel框架站点的更多相关文章
- nginx中access_log和nginx.conf中的log_format用法
nginx服务器日志相关指令主要有两条: 一条是log_format,用来设置日志格式; 另外一条是access_log,用来指定日志文件的存放路径.格式和缓存大小 可以参加ngx_http_log_ ...
- nginx详解(代理服务器的解释+nginx 在linux 下的安装+nginx.conf 中的配置解释)
一.概论 1.什么是代理服务器 代理服务器,客户机在发送请求时,不会直接发送给目的主机,而是先发送给代理服务器,代理服务接受客户机请求之后,再向主机发出,并接收目的主机返回的数据,存放在代理服务器的硬 ...
- WampServer 在 httpd.conf 中配置多站点 (IP 配置法:不用每次修改 hosts 文件 + 域名配置法 )
因为要用 ThinkPHP 的当前最新版本 3.2.2,对应要求 PHP 的版本要高于 5.3.0,所以安装了 WampServer 2.2 ( Apache 2.2.21,PHP 5.3.10,My ...
- Nginx服务器中配置非80端口的端口转发方法详解
这篇文章主要介绍了Nginx服务器中配置非80端口的端口转发方法详解,文中使用到了Nginx中的proxy_pass配置项,需要的朋友可以参考下 nginx可以很方便的配置成反向代理服务器: 1 2 ...
- 关于nginx中不用.htaccess 用在ningx.conf中配置的问题
官网一直出现http://4**.**..7/php/index.php/admin/base/getConfigs报错404错误问题, 问题一:URL重写问题(nginx配置问题) 问题二:vue中 ...
- Nginx 1.10.1 版本nginx.conf优化配置及详细注释
Nginx 1.10.1 的nginx.conf文件,是调优后的,可以拿来用,有一些设置无效,我备注上了,不知道是不是版本的问题,回头查一下再更正. #普通配置 #==性能配置 #运行用户 user ...
- Nginx配置文件(nginx.conf)配置详解(2)
Nginx的配置文件nginx.conf配置详解如下: user nginx nginx ; Nginx用户及组:用户 组.window下不指定 worker_processes 8; 工作进程:数目 ...
- 在Nginx服务器中设置多个站点
这里以配置1个站点(1个域名)为例,n 个站点可以相应增加调整, 假设:IP地址: 127.0.0.1域名1 phpmyadmin.zhengwen.cn 放在 /www/phpmyadmin.zhe ...
- Nginx配置文件(nginx.conf)配置详解
Nginx的配置文件nginx.conf配置详解如下: user nginx nginx ; Nginx用户及组:用户 组.window下不指定 worker_processes 8; 工作进程:数目 ...
随机推荐
- SVG简介
最近遇到SVG这个名词,于是查阅资料,做个笔记. 前言 图片的数字化.将图片存储为数据有两种方案. 位图.也被称为光栅图.即是以自然的光学的眼光将图片看成在平面上密集排布的点的集合.每个点发出的光有独 ...
- 利用Civil 3D API更改曲面的样式
如果你需要更改曲面的样式,比如更改等高线的颜色等等,在Civil 3D中,你可以通过在toolspace中选中曲面,然后点右键选择“Edit surface style…”然后切换到“Display” ...
- yum使用点滴
yum下载依赖rpm包 先安装一个yum-downloadonly 1 yum install yum-downloadonly完成安装后,yum –help在最后就提示两个命令参数,分别是: Plu ...
- [css]我要用css画幅画(三)
接着之前的[css]我要用css画幅画(二), 今天,我画了一个小人,他的名字暂时叫作小明. 以下只列出本次修改增加的内容 html如下: <div class="human left ...
- WinForm常用属性
Text: 字符串,窗体标题 MaximizeBox: 布尔, 窗体能否最大化 MinimizeBox: 布尔,窗体能否最小化 ShowIcon: 布尔,左上角图标 ShowInTaskbar: 布尔 ...
- MySQL 更新语句技巧
一. 多表更新 1. 数据准备 mysql> mysql> select goods_id, goods_name,goods_cate from tdb_goods; +-------- ...
- charles 抓取eclipse中的请求
charles抓取eclipse中的请求 有时候,想要监测eclipse中发送get获取post请求,一样可以使用代理方式: 1.eclipse代码设置 代码中添加,可以就写在主函数中,然后再调用请求 ...
- shell实现ping命令查看哪些主机在线
#!/bin/bash .{..};do -i 0.5 $a >/dev/null && echo "$a 在线" || echo "$a 离线&q ...
- shell中各种括号的作用()、(())、[]、[[]]、{}
一.小括号,圆括号() 1.单小括号 () ①命令组.括号中的命令将会新开一个子shell顺序执行,所以括号中的变量不能够被脚本余下的部分使用.括号中多个命令之间用分号隔开,最后一个命令可以没有 ...
- Xamarin Error cannot find ‘aapt.exe’
Problem: solution: A workaround is to copy your files to the old directory. Just copy the aapt ...