-2

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

在此处输入图像描述 抱歉,我为我的图片使用了外部链接,需要至少 15 个信誉才能附加图片。.

4

2 回答 2

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=/ 

因此,您只需添加这些文件夹中的任何一个。

于 2014-09-23T03:07:40.010 回答
2

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

于 2014-08-24T15:08:51.460 回答