Changes

From Amahi Wiki
Jump to: navigation, search
no edit summary
<b>NOTE:</b> There is no guarantee this will work for you or not cause problems with your Amahi 7 install. Please proceed with caution as carelessness could render your HDA inoperable.
== Create Manual Web App ==
As [[Open_Terminal_as_root|root user]], perform the following steps:
* Build directory structure
<br />
::If you have problems, retrace your steps. Ensure you replaced all occurrences of appname accordingly and the id field in both tables match.
 
== Delete Manual Web App ==
The process to remove a web app created using the procedure above is a little shorter as you might expect. The steps below will remove it completely from your Amahi 7 instance.
 
<b>NOTE:</b> Please ensure you remove the correct files or you may break an existing web application.
 
* Remove the Apache configuration file
<pre>rm -rf /etc/httpd/conf.d/9999-appname.conf</pre>
* Delete the web app directory
<pre>rm -rf //var/hda/web-apps/appname</pre>
* Restart Apache
<pre>service httpd restart</pre>
* Update Amahi 7 database settings<br />
<pre>echo "INSERT INTO `dns_aliases` (`id`, `name`, `address`) VALUES
(99, 'appname', '')" | mysql -uroot -phda hda_production</pre>
<pre>echo "INSERT INTO `webapps` (`id`, `name`, `path`, `kind`, `aliases`, `fname`, `deletable`, `login_required`, `dns_alias_id`, `custom_options`, `created_at`, `updated_at`) VALUES
(99, 'appname', '/var/hda/web-apps/appname', 'HTML', '', '9999-appname.conf', 0, 0, 99, NULL, '2013-11-17 12:00:00', '2013-11-17 12:00:00')" | mysql -uroot -phda hda_production</pre><br />
 
::Once complete, the web app should now be completely removed.
12,424

edits