I have answered on developerWorks forum about how to create static web site server on IBM Bluemix. But I thought it should be mentioned on this blog too.
Firstly, for users of Bluemix, there seems to have misconception that it is only for web applications, such as Liberty, Node.js. If we really understand the IBM Bluemix architecture, it is composed of Linux (container) and router in a simple view.
The “Router” dispatches access to application URL to each Linux box which is running your application.
In theory, when the communication can be done via HTTP protocol, most of the applications will run on Bluemix. It naturally includes Apache or Nginx web server. We can try it in a simple way.
1. Create a simple index.html file just like below.
<H1>Hello Nginx </H1>
2. Push the contents to Bluemix with Nginx buildpack.
>cf push -b https://github.com/cloudfoundry-community/nginx-buildpack <appname>
Now, you will be able to see the static web site.
In this case, “amnthelloweb.mybluemix.net” is an application URL. The router dispatches the access to this URL to actual Linux container which is running Nginx web server on it. The application server returns static contents “index.html”, and then the traffic goes back to the “Router”.
To appreciate that Bluemix is running a Linux container, we can try Cloud Foundry community buildpack called container-info-buildpack (https://github.com/cloudfoundry-community/container-info-buildpack). Here is my sample screenshot. I have run a simple Linux command such as “ls -l”.
After I deployed this application, I have deleted it completely, since it reveals container itself. I also recommend to delete the application after you have tried something.
Now, you might have understood about the Bluemix in a simple view.