Specifying Webroot from Apache httpd File in Heroku Cloud is possible to set just in the way in case of our server with SSH / Telnet access. Please read and follow the previous guide on Advanced Commands for Perfect Setup for Heroku Cloud, before proceeding with this step by step guide for Specifying Webroot and configuring it. Otherwise it might appear to be difficult to follow.
What you need to know before Specifying Webroot in Heroku Cloud
As you can guess, we are practically setting up Heroku Cloud, just like as if a server with ‘normal’ setup. We have used iTerm2 on OS X 10.8 (tmux shell) on our MacBook Pro as mentioned in the previous guide. You might have to change few commands which we might have used for local files. Quite obviously, commands for remote Heroku Server will remain the same for any operating system.
As we declared before, these two instruction guide including this Specifying Webroot from Apache httpd File guide is not ‘discovered’ by me. Our normal guide’s are usually our own find out.
We want that that, even a new developer can work easily, we made them digested, we want that, as part of free software movement, you also try to improve the methods.
Specifying Webroot from Apache httpd File in Heroku Cloud
So, I am taking that, you are starting from the last step of previous guide. The reason is nothing but I have kept the iTerm2 window open since yesterday !
Heroku Cloud’s webroot is actually mapped to /app/www. So for Apache configuration, we need to set in the way, so that it becomes a normal Apache setup. You will notice in the previous guide that, we used the command heroku run bash to start bash. You need to be inside an app directory, either master or production branch (the thing is nothing but simply follow the old guide). You will need as script from here :
Clone it :
git clone git://github.com/winglian/Heroku-PHP.git
So a directory named Heroku-PHP will be created and there will be a conf folder and inside it the script web-boot.sh will be sitting :
You can always move all files to root using the unix command mv * . ; now we need to maintain the web directory’s path structure. So adjust accordingly so that you can run the script :
You can see the script for understanding :
Now it becoming obvious that editing conf/httpd/default.conf file in the way we normally do, will set the web root. This is why we named this guide as Specifying Webroot from Apache httpd File in Heroku Cloud – you can set now in the way you want.