国产探花免费观看_亚洲丰满少妇自慰呻吟_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.

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 宣城市| 郎溪县| 乌恰县| 库尔勒市| 溧水县| 托里县| 孝感市| 沈丘县| 龙海市| 遵化市| 合山市| 徐汇区| 汉川市| 广饶县| 连云港市| 江都市| 安丘市| 延安市| 密山市| 木里| 青川县| 磴口县| 广宁县| 惠水县| 新邵县| 利川市| 新晃| 微山县| 渭源县| 泾源县| 宝清县| 东乌珠穆沁旗| 泗水县| 靖宇县| 平远县| 筠连县| 康马县| 荔浦县| 宁阳县| 万安县| 商丘市|