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...
-
Check this answer: http://stackoverflow.com/questions/3753459/zend-framework-deployment-in-server – Feb 15 '15 at 11:42
-
1@Levente Nagy Thank's man, i tried to see if there is another way to do it, but htaccess seems to be the one ( i need )... Maybe there is another way, but don't know and can't find it on docs from bluemix .. Again, thanks man :) – crazy_ljuba Feb 15 '15 at 13:01
1 Answers
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.
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.

- 4,899
- 1
- 24
- 48
-
Thanks man for the info... Will check it out later :) and may have some questions :) – crazy_ljuba Feb 24 '15 at 14:32
-
Just checking up, everything works well ( without htaccess ) Thanks a lot – crazy_ljuba Feb 24 '15 at 23:10
-
can't :( Curses... because someone didn't accepted my answer i have only 10pts :( Vote Up requires 15 reputation – crazy_ljuba Feb 25 '15 at 09:03