I am trying to deploy a simple PHP website to the Swisscom Application Cloud, based on cloud foundry.
My website is working fine locally, served by Apache.
I have followed the tutorial, but I am not clear on some aspects.
In the tutorial, the way to check if the app is working normally is to run it in the built-in web server in php through php -S
. This doesn't work for me because my website has html
extensions for php
files and these are not interpreted correctly by the built-in server. In Apache, I can configure that just fine in the httpd.conf
file, but here I don't know how to configure such a behaviour.
That's fine by me, because I can still check the website locally serving via Apache. The problem is that it looks that in the cloud this is the way to run the app as well, although I couldn't find more info in the documentation.
I'd be surprised that this is how the app is run in production because the php documentation states the following about the built-in server:
"It is not intended to be a full-featured web server. It should not be used on a public network."
Are the web apps being run on Apache in the Swisscom Application Cloud? If yes, how do I get access to configure the httpd.conf
and php.ini
files? If no, how can I configure the special behavior I need for my app?
UPDATE:
Here is a sample php app which summarizes what I am trying to achieve: deploy it in cloud foundry interpreting html files as php files.
https://github.com/atineoSE/sample-php-app-cloudfoundry
Following @daniel-mikusa 's links to documentation I added special config related to the mime types under .bp-config/httpd/extra/httpd-mime.conf
. This doesn't work as expected, though. Accessing from firefox, I am prompted to download the file. It works fine when I serve it locally via Apache with the same directive in the httpd.conf
file.