nginx conf 文件
生活随笔
收集整理的這篇文章主要介紹了
nginx conf 文件
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
server{listen 80;server_name local.light.com;index index.html index.htm index.php;root /home/wwwroot/default/******/Public; // !!!! 所在的文件需要有可執行權限, 一般是755 的權限,否則會報403 找不到文件 的錯誤#error_page 404 /404.html;include enable-php-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 ~ /\.{deny all;}access_log /home/wwwlogs/access_****.log;}
include enable-php-pathinfo.conf; 這里很重要 有時候引入enable-php.conf 文件
如果這里注釋掉,將解析不了php文件,就會出現訪問php文件,直接下載了php文件的發生!
?
include enable-php-pathinfo.conf; 這里很重要 有時候引入enable-php.conf 文件
如果這里注釋掉,將解析不了php文件,就會出現訪問php文件,直接下載了php文件的發生!
?
?
轉載于:https://www.cnblogs.com/pansidong/p/11124486.html
《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀總結
以上是生活随笔為你收集整理的nginx conf 文件的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Day 31 并发编程
- 下一篇: Linux下grep显示前后几行信息