joomla 在Niginx下的rewrite规则很简单,主要就是红色部分
如果出现502错误,请参看前一篇介绍
server {
  server_name www.xxx.com;
  root /home/xxx/www/www.xxx.com;
  index index.php index.html;
 
  location / {
    try_files $uri $uri/ /index.php?q=$request_uri;
  }
 
  location ~ .php$ {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  }
}

原创文章,转载请注明: 转载自贝壳博客

本文链接地址: Joomla Nginx rewrite

今天装完joomla,能进后台,但是前台一直报502 Bad Gateway错误,网上搜索后找到解决办法,是由于Nginx中FastCGI buffer不够,这是张宴前辈的配置
修改nginx.conf,添加如下fastcgi设置
http {

  ********

    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 128k;
  *******
}

原创文章,转载请注明: 转载自贝壳博客

本文链接地址: 解决由FastCGI Buffer不够引起的Joomla 在Nginx下出现 502 Bad Gateway 错误