[英]how to deploy a custom skeleton application in Bluemix php
In Bluemix if I create an application starting from php template then the DocumentRoot is set to: 在Bluemix中,如果我从php模板开始创建应用程序,则DocumentRoot设置为:
/htdocs
. /htdocs
。
I actually would like to have a dir structure like this: 我实际上想要这样的目录结构:
/htdocs
/public_html
index.php
/myCode
myPhpClass.php
with httpd.conf DocumentRoot="${HOME}/htdocs/public_html". 使用httpd.conf DocumentRoot =“$ {HOME} / htdocs / public_html”。
So I tried to push this community buildpack https://github.com/cloudfoundry/php-buildpack.git from my local myAppName dir: 所以我试图从我的本地myAppName目录推送这个社区buildpack https://github.com/cloudfoundry/php-buildpack.git :
/var
/www
/myAppName
/public_html
index.php
/myCode
myOhoClass.php
/.bp-config
options.json
using cf: 使用cf:
[... myAppName]# cf push -s cflinuxfs2 -m 128M -b https://github.com/cloudfoundry/php-buildpack.git myAppName
where options.json file: 其中options.json文件:
{
"WEBDIR": "htdocs/public_html"
}
but what I ended to get in Bluemix is: 但我在Bluemix中得到的结论是:
/htdocs
/public_html
/public_html
index.php
/myCode
myPhpClass.php
Is there a way to have a custom directory structure for an apache httpd/php application in Bluemix? 有没有办法在Bluemix中为apache httpd / php应用程序提供自定义目录结构?
Your .bp-config/options.json
file is a little wrong. 你的
.bp-config/options.json
文件有点不对劲。 It should be the following. 它应该如下。
{
"WEBDIR": "public_html"
}
I just tried things myself with a PHP app and it worked fine. 我只是用PHP应用程序自己尝试过,它运行正常。
cf push php-test-jbs -b https://github.com/cloudfoundry/php-buildpack.git -s cflinuxfs2
Additionally to deploy the sample click the following. 此外,要部署示例,请单击以下内容。
or goto the Github project to check out a full sample. 或者转到Github项目查看完整的样本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.