建立一个 Openshift "Do-It-Yourself" 应用
Openshift 的 "Do-It-Yourself" 就是自己可以编译定制 WEB 服务器 ,因为Openshift自带的 WEB 服务器的配置文件 ~/php/configuration/etc/conf.d/openshift.conf 是无权修改的。
WEB 服务器的 启动管理是 ~/app-root/runtime/repo/.openshift/action_hooks/ 中的相关文件
https://openshift.redhat.com/app/console/application_type/cart!diy-0.1
建成后,登录SSH
cd app-root/runtime/repo/
git clone https://github.com/laobubu/openshift-php5.5-cgi-apache.git
cd openshift-php5.5-cgi-apache
cp -r .openshift ../
cp -r mise ../
cp -r conf ../
cp -r wwww ../
nohup $OPENSHIFT_REPO_DIR/misc/make.sh > $OPENSHIFT_DIY_LOG_DIR/make.log & tail -f $OPENSHIFT_DIY_LOG_DIR/make.log
等待一个小时后,编译完成。
打开你的 website (格式是 foo-bar.rhcloud.com ) 验证WEB服务器是否安装完成
当修改后 conf/httpd.conf, 务必重启 app, 或者是 ${OPENSHIFT_REPO_DIR}/.openshift/action_hooks/reload.
具体操作看 .openshift
https://github.com/laobubu/openshift-php5.5-cgi-apache
https://github.com/rexdf/openshift-nginx-php55
https://github.com/boekkooi/openshift-diy-nginx-php
https://github.com/boekkooi/openshift-cartridge-php
https://blog.openshift.com/how-to-run-nginx-php-fpm-under-openshift/
相关文件 http://blog.laobubu.net/archives/move-to-openshift/