繁体   English   中英

Zend Nginx路由是空白页,没有错误

[英]Zend Nginx routes are blank pages with no errors

最近将站点从LAMP移到了LEMP设置,由于主站点页面显示正常,但我遇到了麻烦,但是所有子页面路由都是空白白页,没有错误输出。

因此根目录www.mysite.com起作用,但www.mysite.com/login或www.mysite.com/signup无效。 只是一张空白的白纸。

我查看了/var/log/nginx/error.log并通过添加...启用了错误。

ini_set('display_startup_errors',1);
ini_set('display_errors',1);
error_reporting(-1);

...在我的index.php中,我不确定用Nginx做任何事情。 我对Nginx有点陌生。

更新:

因此,似乎htaccess规则未被NginX识别:

RewriteEngine On

# Force SSL
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.mysite.com/$1 [R,L]

# The following rule tells Apache that if the requested filename
# exists, simply serve it.
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]


# The following rewrites all other queries to index.php. The
# condition ensures that if you are using Apache aliases to do
# mass virtual hosting, the base path will be prepended to
# allow proper resolution of the index.php file; it will work
# in non-aliased environments as well, providing a safe, one-size
# fits all solution.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::^B$
RewriteRule ^(.*)$ - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]

我怎样才能让NginX使用这些规则?

也许在不调用index.php的情况下尝试在php.ini中设置display_errors = On

另外,您是否已经rewrite / /index.php; 该网站的位置?

参见Magento-Wiki-为Magento配置nginx

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM