I often work under a firewall protected network. This means that I can update my whole web faction hosted web site using ftp and django admin but I'm not able to restart the apache server as ssh beyond the firewall is not allowed. I can overcome this problem using ssh made with my mobile device (connected to internet through the cellular network) but I think it would be a nice idea to have the possibility to do an "apache2/bin/restart" from the control panel.
Did someone else face this problem yet?
asked Aug 11 '11 at 06:39
I agree, it would be good to have a way to restart apps via the control panel. That's something we're planning to add to a future version of the panel, but we don't have an ETA yet.
In the meantime, you can use a simple CGI script to restart your app via the web.
First, create a static/cgi/php app in the control panel. You can name the app whatever you want.
Add password protection to the new app directory by following our instructions: Password Protecting a Directory with a Static/CGI/PHP App
Create a file named "restart.py" in your new app directory with the following contents (changing "you" and "your_app" to your username and app name respectively) :
Next, make the script executable:
Finally, add the static/cgi/php app to a site.
Once that's all done, you can restart your app by going to whatever URL you assigned to the static/cgi/php app, followed by the script name, eg http://domain.com/restart.py
Hope that helps!