【发布时间】:2011-05-20 04:40:47
【问题描述】:
有人知道如何在 nginx 服务器的配置文件中配置 server {} 吗? 我在下面有这样的东西:
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 配置?
【问题讨论】:
标签: mysql nginx fastcgi magento