<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.amahi.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tom+Harner</id>
	<title>Amahi Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.amahi.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tom+Harner"/>
	<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php/Special:Contributions/Tom_Harner"/>
	<updated>2026-05-03T19:57:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=Hosting_a_website&amp;diff=46771</id>
		<title>Hosting a website</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=Hosting_a_website&amp;diff=46771"/>
		<updated>2011-09-23T01:29:28Z</updated>

		<summary type="html">&lt;p&gt;Tom Harner: Added a related page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border: 1px solid #B66; padding: .5em 1em; color: #000; background-color: #FEE; margin: 3px 3px 1em 3px;&amp;quot;&amp;gt;&lt;br /&gt;
'''NOTICE: making anything visible outside your network can open security issues, so you are doing this at your own risk. Some apps are more secure than others, but there is nothing ultimately secure. Best is to use the [[VPN]] to login back home.&lt;br /&gt;
&lt;br /&gt;
To access the HDA itself from outside the network using VPN, check out the [[Adito]] application, available to install through the HDA. Adito enables you to access the HDA, and all applications and folders, using just your free username.yourhda.com webaddress.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So you want to run a web server in your Amahi server and make it visible from the web outside your home.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
For the purposes of this guide you need either of the following:&lt;br /&gt;
&lt;br /&gt;
* [[VNC]] access to your HDA if headless&lt;br /&gt;
** ''Terminal is available under Applications -&amp;gt; System Tools -&amp;gt; Terminal''&lt;br /&gt;
* [http://www.amahi.org/apps/ajaxterm Ajaxterm] if headless and no VNC&lt;br /&gt;
* A monitor if you are not headless&lt;br /&gt;
&lt;br /&gt;
To host your own web site you need the following:&lt;br /&gt;
&lt;br /&gt;
* Forward a port to your HDA ip address, either for plain insecure http: 80, for https, 443 (advanced users can use other ports). Some routers call this or require a &amp;quot;virtual server&amp;quot;&lt;br /&gt;
* Chose a domain name that you own (or your free username.yourhda.com that comes with Amahi). This is how the app will be accessed outside&lt;br /&gt;
* Chose the app you want to make accessible outside, let's say, '''yourwebappname'''&lt;br /&gt;
&lt;br /&gt;
= Hosting a single Webapp =&lt;br /&gt;
&lt;br /&gt;
What you need to do in a terminal (as root) is find the apps conf file then edit the conf file for the app:&lt;br /&gt;
{{Code|&lt;br /&gt;
Code=su&lt;br /&gt;
[enter password]&lt;br /&gt;
ls /etc/httpd/conf.d&lt;br /&gt;
}}&lt;br /&gt;
Find your app .conf file. It will look like 10##-yourwebappname.conf&lt;br /&gt;
{{Code|&lt;br /&gt;
Code=nano /etc/httpd/conf.d/10##-'''yourwebappname'''.conf&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Your conf file should look something like this at the top of the page:&lt;br /&gt;
{{Text|&lt;br /&gt;
&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        ServerName app&lt;br /&gt;
        ServerAlias app.YourDomain.lan&lt;br /&gt;
}}&lt;br /&gt;
Add this (immediately after the ServerName directive):&lt;br /&gt;
{{Text|&lt;br /&gt;
     ServerAlias username.yourhda.com&lt;br /&gt;
}}&lt;br /&gt;
So it looks like this:&lt;br /&gt;
{{Text|&lt;br /&gt;
&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        ServerName app&lt;br /&gt;
        ServerAlias app.YourDomain.lan&lt;br /&gt;
        ServerAlias username.yourhda.com&lt;br /&gt;
}}&lt;br /&gt;
You can add more server aliases if you want to access the app under those names (for example: ServerAlias myphotos.DomainName.com). Once you are satisfied with the server aliases, you may save and quit nano by following these steps in Windows:&lt;br /&gt;
&lt;br /&gt;
     ctrl X&lt;br /&gt;
     At the prompt, type &amp;quot;y&amp;quot; to save&lt;br /&gt;
     At the prompt, hit &amp;quot;Enter&amp;quot; to save the file&lt;br /&gt;
&lt;br /&gt;
Restart the server using: &lt;br /&gt;
{{Code|&lt;br /&gt;
service httpd reload&lt;br /&gt;
}}&lt;br /&gt;
And you are done, enjoy your website.&lt;br /&gt;
&lt;br /&gt;
= Hosting Multiple Webapps =&lt;br /&gt;
&lt;br /&gt;
''If you wish to have access to multiple webapps, described below is one way to accomplish this:''&lt;br /&gt;
&lt;br /&gt;
# obtain a domain name (i.e., via godaddy.com) --for example yourdomain.com&lt;br /&gt;
# for each web app you wish to have access to, establish a CNAME or subdomain--for example something.yourdomain.com---and point it to username.yourhda.com (for example see http://help.godaddy.com/article/679 )&lt;br /&gt;
# edit the webapp .conf file (see above) to match the CNAME/subdomain you just established by adding ServerAlias something.yourdomain.com&lt;br /&gt;
# don't forget to restart the server each time you edit a .conf file.&lt;br /&gt;
&lt;br /&gt;
:#For example, you could create the subdomain/CNAME: address.yourdomain.com for the AddressBook webapp---point that subdomain to: username.yourhda.com---in the AddressBook .conf file add: ServerAlias address.yourdomain.com---restart the server---you are done, enjoy using multiple webapps!&lt;br /&gt;
&lt;br /&gt;
= Hosting a Website =&lt;br /&gt;
&lt;br /&gt;
''Prerequisites'': The first order of business is to make sure that your domain name is pointing to your server's IP address. Each website is different, but GoDaddy goes like this:&lt;br /&gt;
:* Go to your GoDaddy's ''My Account'' page. Under Dashboard, click yourdomain.com&lt;br /&gt;
:** Point your cursor at the Nameserver icon, click ''Set Nameservers''&lt;br /&gt;
::: [[File:Nameserverlink.jpg|caption]]&lt;br /&gt;
:** Select ''I want to '''forward''' my domains'' and click OK&lt;br /&gt;
::: [[File:forwarddomainname.jpg|frameless|caption]]&lt;br /&gt;
:* Now go back to your account homepage, and instead of clicking yourdomain.com, check it and click ''View in Domain Manager'' &lt;br /&gt;
:** Click yourdomain.com&lt;br /&gt;
:** Scroll down to '''DNS Manager''' and click ''Launch'' &lt;br /&gt;
:::[[File:DNSmanagger.jpg|frameless|caption]]&lt;br /&gt;
:** Under '''A(Host)''' edit the IP Address(es) to reflect the IP Address of your server. Hit enter and then ''Save Zone File'' when that option appears.&lt;br /&gt;
:::[[File:ahostpointsto.jpg|frameless|caption]]&lt;br /&gt;
:* The effects should appear within one hour&lt;br /&gt;
&lt;br /&gt;
''Hosting'': Hosting a website on your HDA server is basically the same as hosting a webapp, so if we are able to do the previous guides on hosting a webapp(s) the rest will be a cinch.&lt;br /&gt;
&lt;br /&gt;
We will create the website by creating a webapp. This is a lot easier than it sounds, so don't give up just yet!&lt;br /&gt;
# Got your HDA page (http://hda or http://hda.yourhda.com), click ''Setup'' and go to ''Settings''.&lt;br /&gt;
## Make sure your ''Advanced Settings'' option is checked (if not, check and click OK past the warning)&lt;br /&gt;
# Go to ''Apps'' and then ''Webapps''&lt;br /&gt;
# At the very bottom, click ''New Web App'' and type in a name like Website&lt;br /&gt;
:This is where your webpage will reside in, you can name this anything you'd like. This is not the title of your website or webpage. Website will be used as the name for this guide &lt;br /&gt;
:::[[File:newebapp.jpg|frameless|caption]]&lt;br /&gt;
# Do everything as told under the &amp;quot;Hosting a single Webapp&amp;quot; heading above, but of course our app is called Website.&lt;br /&gt;
:''Hint:'' Instead of using user.yourhda.com for your ServerAlias, go ahead and use yourdomain.com ('''without the www.''') if you have one from, for example, GoDaddy.&lt;br /&gt;
# To easily access your website files, we will make the webapp folder a share by doing the following:&lt;br /&gt;
:* In your HDA Dashboard, click ''Setup'' and then ''Shares''&lt;br /&gt;
:* Click ''New Share'' at the very bottom&lt;br /&gt;
:* We will name our share Website&lt;br /&gt;
:** Notice that the path is automatically filled out for us. This is not the path that will be used, so the path that will be typed in will be ''/var/hda/web-apps/Website/'' &lt;br /&gt;
:::[[File:newshare.jpg|frameless|caption]]&lt;br /&gt;
:* Click ''Create this Share'', now the folder will be available from your normal \\hda spot.&lt;br /&gt;
:** You can test your new website by creating an index.html (put something simple, like &amp;quot;hi&amp;quot;, as a text) in the html folder in your Website share folder, and then going to yourdomain.com&lt;br /&gt;
&lt;br /&gt;
And we are finished. To create your website on Fedora, we can use Bluefish program.&lt;br /&gt;
: yum install bluefish&lt;br /&gt;
If we would like to use Windows, we can use any program to make the website. Just drag and drop into the share, and under the folders as needed.&lt;br /&gt;
&lt;br /&gt;
= More Secure Access =&lt;br /&gt;
&lt;br /&gt;
To enable https access to your apps, you can follow the techniques in [[Secure App Access]] page.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
&lt;br /&gt;
* Q: Do i need to do anything for &amp;lt;code&amp;gt;username.yourhda.com&amp;lt;/code&amp;gt; to work?&lt;br /&gt;
      No. That comes free and automatically set up with your Amahi HDA&lt;br /&gt;
&lt;br /&gt;
* Q: What if i want to do it for a .html or .php file?&lt;br /&gt;
      You can do this by creating a Webapp of your own. In the apps tab,&lt;br /&gt;
      select Webapps and create a new one.&lt;br /&gt;
      What you do is, create a web app, and put the files into the root&lt;br /&gt;
      directory of the webap, something like this directory:&lt;br /&gt;
&lt;br /&gt;
          /var/hda/web-apps/'''yourwebappname'''/html&lt;br /&gt;
&lt;br /&gt;
      this directory belongs to apache. you will have to change the&lt;br /&gt;
      ownership to your user (recommended) or otherwise add things as root.&lt;br /&gt;
* Q: How do I change the ownership?&lt;br /&gt;
      You can do this by going to the command screen:&lt;br /&gt;
&lt;br /&gt;
         su -&lt;br /&gt;
         {password}&lt;br /&gt;
         chown {user} /var/hda/web-apps/&lt;br /&gt;
&lt;br /&gt;
= Related =&lt;br /&gt;
&lt;br /&gt;
[[Webapps]]&lt;/div&gt;</summary>
		<author><name>Tom Harner</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=Webapps&amp;diff=46765</id>
		<title>Webapps</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=Webapps&amp;diff=46765"/>
		<updated>2011-09-23T01:27:43Z</updated>

		<summary type="html">&lt;p&gt;Tom Harner: Added a related page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Webapps are your custom web applications, local to your HDA. The power of [http://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP] at your fingertips, right in your home server. They could be your own code or a customized version of an existing app.&lt;br /&gt;
&lt;br /&gt;
See [http://amahi.blip.tv/file/1491674/| the screencast on how to use webapps].&lt;br /&gt;
&lt;br /&gt;
NOTE: the screencast is slightly outdated - the webapps are no longer in their own tab - they are under Applications -&amp;gt; Webapps, and Advanced settings must be enabled for them to show.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once done, you simply proceed to the html dir of the app and install the app as directed by the authors of the app.&lt;br /&gt;
&lt;br /&gt;
You have to create your own app database if any directly with mysql.&lt;br /&gt;
&lt;br /&gt;
However, we provide a little script called&lt;br /&gt;
&lt;br /&gt;
{{Code|hda-create-db-and-user '''dbname'''}}&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once the htmp/php/python/perl/ruby files are installed, the app should be ready to go at the url for it!&lt;br /&gt;
&lt;br /&gt;
== Tips ==&lt;br /&gt;
&lt;br /&gt;
* The root directory as far as Apache is concerned is really the html/ directory. However, in Amahi we create a &amp;quot;base directory&amp;quot; with html/ and logs/*&lt;br /&gt;
* The &amp;quot;base dir&amp;quot; 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:&lt;br /&gt;
&lt;br /&gt;
{{Code|cd /var/hda/web-apps/'''yourwebapp'''&lt;br /&gt;
chown -R '''youruser''' html}}&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
= Related =&lt;br /&gt;
&lt;br /&gt;
[[Hosting_a_website]]&lt;/div&gt;</summary>
		<author><name>Tom Harner</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.amahi.org/index.php?title=WordPress&amp;diff=46759</id>
		<title>WordPress</title>
		<link rel="alternate" type="text/html" href="https://wiki.amahi.org/index.php?title=WordPress&amp;diff=46759"/>
		<updated>2011-09-23T01:18:17Z</updated>

		<summary type="html">&lt;p&gt;Tom Harner: /* Multiple Domains for one site */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Apps]]&lt;br /&gt;
=== Multiple Domains for one site ===&lt;br /&gt;
Supposed you own a domain (e.g myblog.info) and you have a way to update dns servers with your IP case you are dynamic (majority of home users) then you can do also the following:&lt;br /&gt;
&lt;br /&gt;
:'''Step 1'''&lt;br /&gt;
:edit the file /etc/httpd/conf.d/####-wordpress.conf.&lt;br /&gt;
&lt;br /&gt;
::find &lt;br /&gt;
::{{Code|ServerAlias wordpress.yourhomedomain}}&lt;br /&gt;
&lt;br /&gt;
::add this line right after&lt;br /&gt;
::{{Code|ServerAlias myblog.info}}&lt;br /&gt;
&lt;br /&gt;
:'''Step 2'''&lt;br /&gt;
:install to your wordpress the plugin called Domain Mirror. Set up as admin your domains. &lt;br /&gt;
&lt;br /&gt;
This way wordpress  always replays with the correct domain. All links from dashboard work without problems.&lt;br /&gt;
&lt;br /&gt;
'''Related articles:'''&lt;br /&gt;
&lt;br /&gt;
[[Hosting_a_website]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== DropBox as Image Host ===&lt;br /&gt;
If you used Multiple Domains means that you want your wordpress available to Internet.&lt;br /&gt;
Images needs bandwidth and using lots of them crate problems when you host a site in a home server.&lt;br /&gt;
&lt;br /&gt;
By using this how to for [[DropBox]] at the end you have a share in your network \\hda.yourdomain\Dropbox\.&lt;br /&gt;
&lt;br /&gt;
There is a [[WordPress]] plugin available called [[http://wordpress.org/extend/plugins/dropbox-sync/ Dropbox]]. This plugin will allow you to remotely host your images on dropbox. This will improve loading times and decrease bandwidth useage on your server!&lt;br /&gt;
&lt;br /&gt;
Setup is very easy.&lt;br /&gt;
[[File:Wp+db1.png]]&lt;br /&gt;
&lt;br /&gt;
After syncing all images will be in \Dropbox\Public\uploads\year\month&lt;br /&gt;
&lt;br /&gt;
=== DropBox as file upload===&lt;br /&gt;
Again first step includes the [[DropBox]] HowTo.&lt;br /&gt;
&lt;br /&gt;
The wordpress plugin called [[http://wordpress.org/extend/plugins/dropbox-upload-form/ Dropbox Upload Form]]. &lt;br /&gt;
&lt;br /&gt;
This plugin lets you insert an upload form on your pages so visitors can upload files to a Dropbox account.&lt;/div&gt;</summary>
		<author><name>Tom Harner</name></author>
		
	</entry>
</feed>