lnmp一键包的thinkphp5 nginx配置分享
生活随笔
收集整理的這篇文章主要介紹了
lnmp一键包的thinkphp5 nginx配置分享
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
2019獨角獸企業重金招聘Python工程師標準>>>
server { listen 80 default_server; #listen [::]:80 default_server ipv6only=on; server_name _; index index.html index.htm index.php; root /home/wwwroot/default; #error_page 404 /404.html; # Deny access to PHP files in specific directory #location ~ /(wp-content|uploads|wp-includes|images)/.*.php$ { deny all; }
location /{fastcgi_pass unix:/tmp/php-cgi.sock;fastcgi_index index.php;include fastcgi.conf;if (!-d $request_filename){set $rule_0 1$rule_0;}if (!-f $request_filename){set $rule_0 2$rule_0;}if ($rule_0 = "21"){rewrite ^/(.*)$ /index.php/$1 last;}include pathinfo.conf;}location /nginx_status{stub_status on;access_log off;}location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)${expires 30d;}location ~ .*\.(js|css)?${expires 12h;}location ~ /.well-known {allow all;}location ~ /\.{deny all;}access_log /home/wwwlogs/access.log; }轉載于:https://my.oschina.net/u/3766399/blog/2246949
總結
以上是生活随笔為你收集整理的lnmp一键包的thinkphp5 nginx配置分享的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: leetcode算法题01
- 下一篇: 统一认证服务CAS 5安装