OPENSHIFT - 如何更改文档根目录?

时间:2014-08-24 07:27:54

标签: php dns openshift public-html public-folders

您好,我是openshift新手用户,之前我使用cpanel进行托管,我想切换到openshift,我问的是如何更改文档根目录?如果之前在cpanel上是Home / public_html /thelifestylelist.com到home / public_html / thelifestylelist.com / public on openshift? (我的索引php在公共目录上) 希望下面的图片可以澄清我的问题。 谢谢。

enter image description here 对不起,我使用外部链接为我的形象,需要至少15声誉附加图像。

2 个答案:

答案 0 :(得分:5)

这是OpenShift搜索根目录的命令

IF php/ dir exists THEN DocumentRoot=php/  
ELSE IF public/ dir exists THEN DocumentRoot=public/  
ELSE IF public_html/ dir exists THEN DocumentRoot=public_html/  
ELSE IF web/ dir exists THEN DocumentRoot=web/  
ELSE IF www/ dir exists THEN DocumentRoot=www/  
ELSE DocumentRoot=/ 

所以你只需要添加任何这个文件夹。

答案 1 :(得分:2)

根据这篇博客文章,您可以将多个文档根用于PHP项目(或静态html项目),您可以在此处阅读:https://www.openshift.com/blogs/openshift-online-march-2014-release-blog。由于您使用的是开放式班次,因此最好只使用他们为您提供的文档根目录,方法是使用git将文件下载/上传到您的设备。您可以查看此页面以帮助您入门:https://www.openshift.com/get-started

相关问题