server {
listen 80;
listen 443 ssl http2;
server_name .ttlad.test;
root "/home/vagrant/code/TTL/ttlad";
index index.html index.htm index.php;
charset utf-8;
location / {
root html/code;
index index.php index.html index.htm;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
error_log /var/log/nginx/ttlad.test-error.log error;
sendfile off;
client_max_body_size 100m;
location ~ \.php {
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /\.ht {
deny all;
}
ssl_certificate /etc/nginx/ssl/ttlad.test.crt;
ssl_certificate_key /etc/nginx/ssl/ttlad.test.key;
}
Vagrant中Nginx对应Thinkphp3.2配置
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- I/O模型: 阻塞型、非阻塞型、复用型、信号驱动型、异步 同步/异步:关注消息通知机制 消息通知:同步:等待对方返...