前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >nginx+yii2

nginx+yii2

作者头像
双面人
发布2019-11-22 09:53:24
3190
发布2019-11-22 09:53:24
举报
文章被收录于专栏:热爱IT热爱IT
代码语言:javascript
复制

 user  nginx;
 worker_processes  auto;
#error_log  logs/error.log;
 #error_log  logs/error.log  notice;
 #error_log  logs/error.log  info;
#pid        logs/nginx.pid;

 events {
     worker_connections  1024;
 }

 http {
     include       mime.types;
     default_type  application/octet-stream;
    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
     #                  '$status $body_bytes_sent "$http_referer" '
     #                  '"$http_user_agent" "$http_x_forwarded_for"';
    #access_log  logs/access.log  main;
    sendfile        on;
     #tcp_nopush     on;
    #keepalive_timeout  0;
     keepalive_timeout  65;
    server_names_hash_bucket_size 512;
     client_header_buffer_size 32k;
     large_client_header_buffers 4 32k;
     client_max_body_size 50m;

     fastcgi_connect_timeout 300;
     fastcgi_send_timeout 300;
     fastcgi_read_timeout 300;
     fastcgi_buffer_size 64k;
     fastcgi_buffers 4 64k;
     fastcgi_busy_buffers_size 128k;
     fastcgi_temp_file_write_size 256k;
     fastcgi_intercept_errors on;
server{
     listen 80; 
     include /var/www/html/store/web/.htaccess ;
     server_name shop.labike.xyz; #绑定域名  
     location / {  
         root   /var/www/html/store/web;  
         index  index.php index.html index.htm;
     try_files $uri $uri/ /index.php$is_args$args;
 
 
     }  
     location ~ \.php$ {  
         root           /var/www/html/store/web;  
         fastcgi_pass   127.0.0.1:9000;  
         fastcgi_index  index.php;  
         #fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;  
         fastcgi_param  SCRIPT_FILENAME  /var/www/html/store/web$fastcgi_script_name;  
         include        fastcgi_params;  
     }  
 }  
 
 }
 

yii2

代码语言:javascript
复制
'urlManager' => [
    'enablePrettyUrl' => true,
    'showScriptName' => false,
    'rules' => [
    ],
],
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档