Difference between revisions of "Hosting a website"

From Amahi Wiki
Jump to: navigation, search
Line 29: Line 29:
  
 
* Q: What if i want to do it for a .html or .php file?
 
* Q: What if i want to do it for a .html or .php file?
       You can do this by creating a Webapp of your own. In the apps tab, select Webapps and create a new one.
+
       You can do this by creating a Webapp of your own. In the apps tab,
 +
      select Webapps and create a new one.

Revision as of 20:21, 17 June 2009

You want to run a web server in your Amahi server and make it visible from the web outside your home.

FIRST: 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."

With that out of the way, you need the following:

  • 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 "virtual server"
  • 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
  • Chose the app you want to make accessible outside, let's say, blog

What you need to do (as root) is edit the config file for the app:

    cd /etc/httpd/conf.d
    nano *blog.conf

Then add:

    ServerAlias username.yourhda.com

You can add more server aliases if you want to access the app under those names. Then restart the server:

    serivce httpd reload


FAQs

  • Q: Do i need to do anything for username.yourhda.com to work?
     No. That comes free and automatically set up with your Amahi HDA
  • Q: What if i want to do it for a .html or .php file?
     You can do this by creating a Webapp of your own. In the apps tab,
     select Webapps and create a new one.