openshift

OpenShift, python 2.7 and static files with htaccess

﹥>﹥吖頭↗ 提交于 2019-12-21 20:55:03
问题 I'm trying to configure apache to serve static files for URLs like site.com/img/bla.jpg . Python cartridge + flask. I know what there is an preconfigured alias for wsg/static directory, so we can use site.com/static/bla.jpg . But I need additional static directory. Project structure: /wsgi .htaccess /img -> $OPENSHIFT_DATA_DIR/some/path (soft link) /static application In the backend I binded mysite.com/img/<filename> for testing if apache or backend handles files - it returns "ok [filename]"

How do I add an alias for a naked domain with OpenShift?

帅比萌擦擦* 提交于 2019-12-21 05:41:57
问题 How can I make my naked domain to point to my Openshift application? Can it be done in the Openshift online dashboard or it can only be configured through the rhc utility? However I am not sure which the steps to do it. 回答1: It's a two-step process: First, make sure that you have a DNS provider that offers support for naked CNAMES , then and add one or more CNAME entries that point to the URL that OpenShift provided for your application (APPNAME-NAMESPACE.rhcloud.com or similar). Next, use

Openshift Port forwarding

99封情书 提交于 2019-12-21 05:03:06
问题 There already a lot of topics about it. But I'm stuck I configured ssh with succes! Now I like to configure the portforwarding for connection with TOAD. I used this tut: https://blog.openshift.com/getting-started-with-port-forwarding-on-openshift/ Now when I try rhc port-forward -a php I get this error Could not parse PKey: no start line I founded this: http://blog.skypayjm.com/2015/02/accessing-remote-openshifts-database.html I tried to downgrade ssh, but it didn't change anything. Does

How to connect OpenShift with a private BitBucket Repository

最后都变了- 提交于 2019-12-21 03:41:13
问题 I want to host a website on OpenShift but I want my code to synchronize automatically with a "free but private" service like Git, so I found BitBucket. I tried to connect it by my self by pasting this key from my OpenShift app: ssh://530910bd5973ca01ea00007d@XXXXXXXXXX.rhcloud.com/~/git/XXXXXXXXXX.git/ into: BitBucket -> Repository -> Import Repository -> Old Repository. But I get this error: Unsupported protocol. Please use 'http://', 'https://' , 'svn://' or 'git://. I believe I have the

How to keep file sync'd in OpenShift?

老子叫甜甜 提交于 2019-12-21 02:56:32
问题 For OpenShift: I created a test directory in ~ app-root/repo/data. I also have locally ' myapp'/data directory. I can push up to OpenShift with git. My test files upload fine which I can check with ssh. Now I create a file with nano or vim remotely --file named remoteFileVim The files exists in the repo/data directory. When I do git pull locally, I dont see that file remoteFileVim . I created a second file in app-root/data called secondVimFile , How do I pull this file to local machine. Can I

Using Python 3.3 in OpenShift's book example

半世苍凉 提交于 2019-12-21 02:07:07
问题 OpenShift recently published a book, "Getting Started with OpenShift". It is a good guide for someone just starting out. In Chapter 3 they show how to modify a template application to use Python 2.7 and Flask. Our requirement is for Python 3.3. On Page 19, one of the modifications to wsgi.py is: execfile(virtualenv, dict( file =virtualenv)). execfile was done away with in 3.x. There are examples in StackOverflow on how to translate but it is not clear to me how to apply those to this case.

Using openshift rhc tail command

為{幸葍}努か 提交于 2019-12-20 20:01:36
问题 How do you tail openshift log files? I issued the following command: rhc tail myapp It seems to show first error line and then stops, but doesn't exit. If I press ctrl+C it asks whether to stop batch or not. How can I display last few errors and may be browse page by page? Is there page down/ page up shortcuts? 回答1: The 'rhc tail' command reads the last few lines of each of your log files and continues to feed subsequent log messages to your console. To view the entire log file, please review

Openshift redirects wp-admin to https

浪尽此生 提交于 2019-12-20 15:38:49
问题 In general option in wordpress, I have changed the wordpress directory to be on http://mywebsite.com but wordpress dashboard is still in htpps causing mixed content warning and images in dashboard are not displayed even after disabling mixed content filter on firefox. I this is my .htaccess file Options +FollowSymlinks <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} ^443$ RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1 [R=301,L] # BEGIN WordPress RewriteCond %{REQUEST_FILENAME}

What is the difference between persistent volume (PV) and persistent volume claim (PVC) in simple terms?

左心房为你撑大大i 提交于 2019-12-20 11:02:45
问题 What is the difference between persistent volume (PV) and persistent volume claim (PVC) in Kubernetes/ Openshift by referring to documentation? What is the difference between both in simple terms? 回答1: PVC is a declaration of need for storage that can at some point become available - as in bound to some actual PV . It is a bit like the asynchronous programming concept of a promise . PVC promises that it will at some point "translate" into storage volume that your application will be able to

What is the difference between persistent volume (PV) and persistent volume claim (PVC) in simple terms?

回眸只為那壹抹淺笑 提交于 2019-12-20 11:00:13
问题 What is the difference between persistent volume (PV) and persistent volume claim (PVC) in Kubernetes/ Openshift by referring to documentation? What is the difference between both in simple terms? 回答1: PVC is a declaration of need for storage that can at some point become available - as in bound to some actual PV . It is a bit like the asynchronous programming concept of a promise . PVC promises that it will at some point "translate" into storage volume that your application will be able to