国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > Nginx > 正文

Laravel Nginx配置步驟詳解

2024-08-30 12:06:35
字體:
來源:轉載
供稿:網友

這是一個Laravel框架運行nginx服務器的配置示例,Laravel框架版本5.2.

  1. server { 
  2.     listen       80; 
  3.     server_name  localhost; 
  4.     root   /usr/share/nginx/html/tanteng.me/public
  5.     index index.php index.html index.htm; 
  6.  
  7.     #charset koi8-r; 
  8.     #access_log  /var/log/nginx/log/host.access.log  main; 
  9.  
  10.     location / { 
  11.         try_files $uri $uri/ /index.php?$query_string
  12.     } 
  13.  
  14.     #error_page  404              /404.html; 
  15.  
  16.     # redirect server error pages to the static page /50x.html 
  17.     # 
  18.     error_page   500 502 503 504  /50x.html; 
  19.     location = /50x.html { 
  20.         root   /usr/share/nginx/html/tanteng.me/public
  21.     } 
  22.  
  23.     # proxy the PHP scripts to Apache listening on 127.0.0.1:80 
  24.     # 
  25.     #location ~ /.php$ { 
  26.     #   proxy_pass   http://127.0.0.1; 
  27.     #} 
  28.  
  29.     # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 
  30.     # 
  31.     location ~ /.php$ { 
  32.         fastcgi_pass   127.0.0.1:9000; 
  33.         fastcgi_index  index.php; 
  34.         fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name
  35.         include        fastcgi_params; 
  36.     } 
  37.  
  38.     # deny access to .htaccess files, if Apache's document root 
  39.     # concurs with nginx's one 
  40.     # 
  41.     location ~ //.ht { 
  42.         deny  all; 
  43.     } 

運行在CentOS 7環境,Nginx版本1.8.

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 永兴县| 环江| 沅江市| 同心县| 辉县市| 峨眉山市| 河池市| 遂溪县| 阳江市| 佳木斯市| 彭山县| 彰武县| 文登市| 平湖市| 湾仔区| 侯马市| 德兴市| 博乐市| 同德县| 上高县| 泰州市| 晋城| 沙河市| 札达县| 北海市| 武夷山市| 铜鼓县| 西峡县| 蒲城县| 尤溪县| 安顺市| 新干县| 凤庆县| 措勤县| 开远市| 涞水县| 平定县| 财经| 阿巴嘎旗| 满洲里市| 余江县|