Difference between revisions of "Webapps"
Tom Harner (talk | contribs) m (Added a related page) |
|||
(9 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
See [http://amahi.blip.tv/file/1491674/| the screencast on how to use webapps]. | See [http://amahi.blip.tv/file/1491674/| the screencast on how to use webapps]. | ||
− | NOTE: the screencast is slightly outdated - the webapps are no longer in their own tab - they are under Applications -> Webapps, and Advanced settings must be enabled for them to show. | + | '''NOTE:''' the screencast is slightly outdated - the webapps are no longer in their own tab - they are under Applications -> Webapps (Amahi 6), and Advanced settings must be enabled for them to show. The Amahi [https://www.amahi.org/apps/web-apps Web Apps] application provides this functionality for Amahi 7 or greater. |
Creating a webapp creates a root directory (gives you the choice to change it) and a short, local dns name to conveniently access that app. | Creating a webapp creates a root directory (gives you the choice to change it) and a short, local dns name to conveniently access that app. | ||
Line 13: | Line 13: | ||
However, we provide a little script called | However, we provide a little script called | ||
− | + | hda-create-db-and-user dbname | |
which creates a database called '''dbname''' and a corresponding user name for it matching (the password is also the DB and user name). Run hda-create-db-and-user -h for help on customizing the username and password as well as dropping the db and user. | which creates a database called '''dbname''' and a corresponding user name for it matching (the password is also the DB and user name). Run hda-create-db-and-user -h for help on customizing the username and password as well as dropping the db and user. | ||
Line 24: | Line 24: | ||
* The "base dir" that Amahi creates is owned by user '''apache''' by default, so you may want to change the permissions so that other users can create and edit files in that area: | * The "base dir" that Amahi creates is owned by user '''apache''' by default, so you may want to change the permissions so that other users can create and edit files in that area: | ||
− | + | cd /var/hda/web-apps/yourwebapp | |
− | chown -R | + | chown -R youruser:users html |
* Some people find it useful to create a new share pointing to the webapp root directory to be able to easily edit their files from their client computer(s) in their favorite editor. | * Some people find it useful to create a new share pointing to the webapp root directory to be able to easily edit their files from their client computer(s) in their favorite editor. | ||
Line 31: | Line 31: | ||
= Related = | = Related = | ||
− | [[Hosting_a_website]] | + | [[Hosting_a_website|Hosting a Website]] |
Latest revision as of 01:00, 25 March 2016
Webapps are your custom web applications, local to your HDA. The power of LAMP at your fingertips, right in your home server. They could be your own code or a customized version of an existing app.
See the screencast on how to use webapps.
NOTE: the screencast is slightly outdated - the webapps are no longer in their own tab - they are under Applications -> Webapps (Amahi 6), and Advanced settings must be enabled for them to show. The Amahi Web Apps application provides this functionality for Amahi 7 or greater.
Creating a webapp creates a root directory (gives you the choice to change it) and a short, local dns name to conveniently access that app.
Once done, you simply proceed to the html dir of the app and install the app as directed by the authors of the app.
You have to create your own app database if any directly with mysql.
However, we provide a little script called
hda-create-db-and-user dbname
which creates a database called dbname and a corresponding user name for it matching (the password is also the DB and user name). Run hda-create-db-and-user -h for help on customizing the username and password as well as dropping the db and user.
Once the htmp/php/python/perl/ruby files are installed, the app should be ready to go at the url for it!
Tips
- The root directory as far as Apache is concerned is really the html/ directory. However, in Amahi we create a "base directory" with html/ and logs/*
- The "base dir" that Amahi creates is owned by user apache by default, so you may want to change the permissions so that other users can create and edit files in that area:
cd /var/hda/web-apps/yourwebapp chown -R youruser:users html
- Some people find it useful to create a new share pointing to the webapp root directory to be able to easily edit their files from their client computer(s) in their favorite editor.