Let me explain further as the subject is somewhat vague.
First, I am not new to linux, but I am still somewhat a novice. I have Amahi working great and loving it with no issues. This is more of a how do I...
I have a web based application running on the Amahi server (running under linux independent of Amahi though) that runs only on a particular port. I can access this app by going to 'http://hda:9999'. I want to be able to go to just a short url i.e. 'http://application' and have it automatically route to the hda on port 9999 so that users just need to type the short name and not need to remember the port.
I imagine this is possible, and I attempted to do it for a few hours using virtual servers in apache, but that seems requires a data directory where the html interface is located to load the page. That partially works, but it only displays the webpage, but I can't interact with it and it seems there should be a simpler solution. I basically want it to just forward my request that comes in on port 80 to the application port 9999. Amahi is running as my DNS I would like it to be able to resolve these short names to the correct ip:port.
I really appreciate any input and look forward to the expanding possibilities of this server!
Additional info:
Amahi 6
Fedora 14
Amahi as DHCP and DNS
Amahi has fixed IP
Short names resolve correctly for Amahi apps and services
Can Amahi DNS translate short name to server:port?
Re: Can Amahi DNS translate short name to server:port?
Hello,
Its best when adding your own apps that you create a web app as shown in the wiki.
http://wiki.amahi.org/index.php/Webapps
By doing this, it will create the .conf file apache needs to access the app. You would also want to put the app files in the dir created, /var/hda/web-apps/appname/html (appname is whatever you called it when creating the web app).
Then, for using a different port, you can edit the /etc/httpd/conf.d/1###-appname.conf file and below the server alias add:
ProxyPass / http://hda:9999
ProxyPassReverse / http://hda:999
Save the changes and restart apache as follows:
service httpd restart
After that, you should be able to use the short URL to access the app. Hope this helps and please let us know if you need further assistance.
Its best when adding your own apps that you create a web app as shown in the wiki.
http://wiki.amahi.org/index.php/Webapps
By doing this, it will create the .conf file apache needs to access the app. You would also want to put the app files in the dir created, /var/hda/web-apps/appname/html (appname is whatever you called it when creating the web app).
Then, for using a different port, you can edit the /etc/httpd/conf.d/1###-appname.conf file and below the server alias add:
ProxyPass / http://hda:9999
ProxyPassReverse / http://hda:999
Save the changes and restart apache as follows:
service httpd restart
After that, you should be able to use the short URL to access the app. Hope this helps and please let us know if you need further assistance.
ßîgƒσστ65
Applications Manager
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2
Applications Manager
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2
Re: Can Amahi DNS translate short name to server:port?
Thanks for the help. With this information I got it working. I had done everything but the ProxyPass command. The only thing I do differently, and if you have any reason why I shouldn't, feel free to let me know, but I use the reload command instead of restart for changes like this, as then it won't stop the entire apache server if there is an error in the config file. So I execute:
service httpd reload
This does not restart the server if there are syntax errors in the config file that would prevent it from starting. Just seems a little safer.
Thanks again!
service httpd reload
This does not restart the server if there are syntax errors in the config file that would prevent it from starting. Just seems a little safer.
Thanks again!
Hello,
Its best when adding your own apps that you create a web app as shown in the wiki.
http://wiki.amahi.org/index.php/Webapps
By doing this, it will create the .conf file apache needs to access the app. You would also want to put the app files in the dir created, /var/hda/web-apps/appname/html (appname is whatever you called it when creating the web app).
Then, for using a different port, you can edit the /etc/httpd/conf.d/1###-appname.conf file and below the server alias add:
ProxyPass / http://hda:9999
ProxyPassReverse / http://hda:999
Save the changes and restart apache as follows:
service httpd restart
After that, you should be able to use the short URL to access the app. Hope this helps and please let us know if you need further assistance.
Who is online
Users browsing this forum: No registered users and 25 guests