Mysql 使用Magento 1.8的Nginx配置

Mysql 使用Magento 1.8的Nginx配置,mysql,nginx,fastcgi,magento,Mysql,Nginx,Fastcgi,Magento,有人知道如何在nginx服务器的配置文件中配置服务器{}吗? 我有这样的想法: server { server_name local.com; root some_path; index index.php; #location / { #try_files $uri $uri/ index.php; #proxy_pass http://127.0.0.1:9000; #} # set a nice expire for assets

有人知道如何在nginx服务器的配置文件中配置服务器{}吗? 我有这样的想法:

server {
  server_name   local.com;

  root some_path;

  index index.php;

  #location / {
    #try_files $uri $uri/ index.php;
    #proxy_pass  http://127.0.0.1:9000;
  #}

  # set a nice expire for assets
  #location ~* "^.+\.(jpe?g|gif|css|png|js|ico|pdf|zip|tar|t?gz|mp3|wav|swf)$" {
  #  expires    max;
  #  add_header Cache-Control public;
  #}

  # the downloader has its own index.php that needs to be used
  #location ~* ^(/downloader|/js|/404|/report)(.*) {
  #  include fastcgi_params;
  #  fastcgi_index index.php;
  #  fastcgi_param  SCRIPT_FILENAME  $document_root$1/index.php$1;
  #  fastcgi_read_timeout 600;
  #  fastcgi_pass  127.0.0.1:9000;
  #}

  location ~* \.php {
    include               fastcgi_params;
    fastcgi_param         SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    fastcgi_read_timeout  18000;
    fastcgi_pass          127.0.0.1:9000;
  }

  #location ~* ^(/index.php)?(.*) {
  #  include               fastcgi_params;
  #  fastcgi_param         SCRIPT_FILENAME  $document_root/index.php$1;
  #  fastcgi_pass          127.0.0.1:9000;
  #  fastcgi_read_timeout  18000;
  #}

}
浏览器返回空白页,不执行php

编辑:

在花了一段时间使用nginx配置和php的东西之后,我最终得到了一个在某些情况下可以正确加载,而在某些情况下不能

例: 我有两个页面是相同的,但出于某种原因,第一个是加载谎言咒语,第二个是加载部分

有时页面正在加载一半

Nginx没有记录任何东西

出于某种原因,当我尝试转到后端时,nginx会使用后端url加载前端:/


是否有人可以为我提供其他magento 1.8配置?

索引
指令之后添加一个指令(实际上,在哪里并不重要,只是为了易读性)

try_files $uri $uri/ /index.php;

碰巧我写了一本更完整的指南:

好的,这不是内存或数据库问题,而是。。。IonCube问题。。。我正在调试核心类,发现脚本在Enterprise模块上停止,并且。。。如果您没有安装IonCube,只需显示空白页面即可

但是,现在Magento返回404:找不到页面

Thx,伙计们,如果你们对第二个问题有什么建议,可以在这里发布:)

应用little fix后:

/* Store or website code */
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';
/* Run store or run website */
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';
Mage::run('', 'store'); //<-this
//Mage::run($mageRunCode, $mageRunType);
/*商店或网站代码*/
$mageRunCode=isset($\u服务器['MAGERUN\u代码'])$_服务器['MAGE_RUN_CODE']:'';
/*经营商店或经营网站*/
$mageRunType=isset($\服务器['MAGERUN\类型'])$_服务器['MAGE_RUN_TYPE']:'store';

法师:运行(“‘存储’”)// 在回答关于MAGE_RUN_代码的后一个问题时,您可以使用nginx映射进行操作。请参阅:

Thx,以帮助您的教程澄清nginx中的一些要点,但我仍然无法强制nginx在我的域中正确执行文件。我以前没有查看注释掉的部分,因此错过了您以前做过的try_文件。如果PHP文件正确执行,但随后内存不足,它们可以返回空白页。Magento会发生这种情况,因为它会覆盖正常的错误报告,并且非常占用内存。您是否尝试过使用
创建一个文件?我确实在index.php的开头添加了phpinfo(),但它仍然是一个空白页面。有趣的是,当我第一次安装nginx时,执行Mage::run(…)之前的所有操作,例如:phpinfo()对不起,我不知道空白页的另一个原因。如果有任何其他错误,它将给出一个“坏网关”或“未指定输入文件”error.location/{index index.php;If(!-e$request_filename){rewrite^(+)$/index.php last;}try_files$uri$uri/index.php;}将其用于从index.php重定向到/和服务器变量:fastcgi_param MAGE_RUN_CODE;快速CGI参数图像运行类型;然后我们可以在代码中使用$_SERVER['MAGE_RUN_code'],在它不工作之前,因为我在nginx配置方面有其他问题。