需要帮助在openshift的nginx上配置php吗
我是openshift和nginx的新手。这是我第一次在nginx上使用PHP5.5创建DIY应用程序。Nginx服务器工作正常,但当我添加php fpm配置时:需要帮助在openshift的nginx上配置php吗,php,nginx,configure,openshift,Php,Nginx,Configure,Openshift,我是openshift和nginx的新手。这是我第一次在nginx上使用PHP5.5创建DIY应用程序。Nginx服务器工作正常,但当我添加php fpm配置时: ... location ~ ^/index.php(/|$) { root html; include fastcgi_params; fastcgi_pass unix:${OPENSHIFT_RUN_DIR}/php-fpm.socket; fastcgi_index index.php; fa
...
location ~ ^/index.php(/|$) {
root html;
include fastcgi_params;
fastcgi_pass unix:${OPENSHIFT_RUN_DIR}/php-fpm.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME html/$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_intercept_errors on;
}
...
在nginx.conf中,我的浏览器出现503错误,告知服务不可用。我已经根据许多建议修改了上面的脚本,但仍然没有运气。有人喜欢吗?谢谢
ps:我也有来自github的追随者,但仍然没有运气我建议你创建一个而不是DIY。目前GitHub上有几个nginx php社区盒带,例如通过Getup Cloud,只需一个命令即可轻松启动:
rhc应用程序创建phphttps://reflector-getupcloud.getup.io/reflect?github=getupcloud/openshift-nginx php fpm
参考资料:
- (早期的例子)