0
votes

I'm trying to deploy a basic cakephp3 web application (clean install) using Openshift Public PaaS (php+mysql+web load balancer). Unfortunately, openshift always display the following message :

503 Service Unavailable
No server is available to handle this request.

I put this cake application in a folder named application on app-repo/runtime/repo openshift folder.
This application works on my local computer (wampserver).

On openshift :

  • If I just put an index.php file with phpinfo(), it works fine.
  • .htaccess seams to work too (rewrite engine)

In fact, I think that I get the message when cakephp launch the dispatch (webroot/index.php)

$dispatcher->dispatch(
Request::createFromGlobals(),
new Response());

Openshift log: (app-root/logs/php.log)

[Wed Sep 17 15:25:53 2014] [error] [client 127.7.200.0] Attempt to serve directory: /var/lib/openshift/*/app-root/runtime/repo/
- - - [17/Sep/2014:15:25:53 -0400] "GET / HTTP/1.0" 404 296 "-" "-"

Help! I really don't know what can I do to solve this... Thanks in advance !

1

1 Answers

2
votes

The load balancer is looking for something to respond on the root context (/) of your application, and since you put your application in a folder named "application" it can't see it, so it thinks the gear is not up, because / is returning a 404 or 503 or something. So you can either ssh into your main gear and modify the haproxy/haproxy.cfg file to monitor your application context of "/application" or you can provide a file for it to monitor on the root context of index.php