crazy_ljuba
crazy_ljuba

Reputation: 104

Bluemix ZF2 change default index file

i'm new to bluemix, and don't know how to change the default index to look to public folder of the zend application, so have a php starter build, pushed the application to server, and when i call my_url, it's showing the default index file, and when i type my_url/public it's showing the zend index page ( obviously ).I want when i type my_url/ to take me to public/ folder by deafult. So has anyone had this kind of "problem"... Searched on their forums, but there is nothing about this case...

Upvotes: 0

Views: 217

Answers (1)

Jeff Sloyer
Jeff Sloyer

Reputation: 4964

Check out the docs here. https://github.com/cloudfoundry/php-buildpack/blob/master/docs/usage.md

The easiest way to use the build pack is to put your assets and PHP files into a directory and push it to CloudFoundry. When you do this, the build pack will take your files and automatically move them into the WEBDIR (defaults to htdocs) folder, which is the directory where your chosen web server looks for the files.

Additionally if you place anything in the lib dir it will not be publically aviailable.

If you place a file in root of your app called .bp-config/options.json you can override the htdocs dir.

https://github.com/cloudfoundry/php-buildpack/blob/master/docs/config.md#httpd-nginx-and-php-configurations

WEBDIR Set a custom location for your web or public files. This is the root directory from which the web server will host your files and the root directory from which PHP-FPM will look for your PHP files. Defaults to htdocs. Other common settings are public, static or html. Path is relative to /home/vcap/app.

Upvotes: 1

Related Questions