Page 2 of 6

Re: Remote Wake-On-LAN Server

Posted: Thu Jan 22, 2015 10:08 am
by rdagijones
Got it. I hope to work on some of this tomorrow.

Re: Remote Wake-On-LAN Server

Posted: Thu Jan 22, 2015 12:48 pm
by rdagijones
Bigfoot65, Here is a link my friend put together that is a step-by-step for installing Remote WOL Server.

http://community.spiceworks.com/how_to/ ... ake-on-lan

[ Post made via Android ] Image

Re: Remote Wake-On-LAN Server

Posted: Thu Jan 22, 2015 2:35 pm
by bigfoot65
Thanks I will refer to it. The document root for the web server is different for Amahi, so will be some deviation of course.

The key to all this is getting the virtual host working on a different port. Once that is sorted out, the rest is easy.

Re: Remote Wake-On-LAN Server

Posted: Thu Jan 22, 2015 2:59 pm
by bigfoot65
I think I got it figured out. Did a test using Adminer on port 8081. These are the steps I took:

A. Add the following line to /etc/httpd/conf/httpd.conf (recommend adding it after Listen 80 line):
Listen 8081
B. Edited /etc/httpd/conf.d/####-adminer.conf and changed 80 to 8081 on the first line:
<VirtualHost *:80>
C. I also updated the ServerAlias line in the same file as follows:
ServerAlias adminer.amahi.net:8081
D. Add this line right below it to use the Amahi dynamic DNS:
ServerAlias username.yourhda.com:8081
D. Restart httpd service (as root user):

Code: Select all

systemctl restart httpd
You will need to port forward 8081 on the router of course to access from outside the network. Anytime you access the app, you will need to append the applicable port to the line as well. I have another option that might work too, but haven't tested it yet.

I think this is good progress and hope it helps. Not too complicated of a change either.

Re: Remote Wake-On-LAN Server

Posted: Thu Jan 22, 2015 6:58 pm
by rdagijones
Under B. Edited /etc/httpd/conf.d/####-adminer.conf and changed 80 to 81 on the first line: Did u mean 81 or 8081?

[ Post made via Android ] Image

Re: Remote Wake-On-LAN Server

Posted: Thu Jan 22, 2015 7:00 pm
by bigfoot65
Sorry, meant 8081. Will correct the post.

Re: Remote Wake-On-LAN Server

Posted: Fri Jan 23, 2015 7:56 pm
by rdagijones
SCORE! I tested Remote Wake-On-LAN Server and it works inside and outside the network. Andrew Blum's work even makes it responsive on my smart phone. Great. Next I want to add a small sql database to it so that users can enter new computers from an interface. For security, I may need to make a take the hash password out of the "Sleep / Wake" page and make a login page that comes up first. We could just use the "Access" function now included in the Amahi Dashboard Web Apps.

As for the Virtual Hosts function, two questions:

1. Will Amahi upgrades "break" the work?

2. Should "Add Virtual Hosts" be packaged as an app? If so, it would need to test if Virtual Hosts have already been added and then have a place to enter a port number (excluding 80 and 443) with a warning ("Take care to not choose a port being used by another app or service on your system" or something like that.) What do you think?

Re: Remote Wake-On-LAN Server

Posted: Fri Jan 23, 2015 8:18 pm
by bigfoot65
Glad it worked.

As for your questions, updates should have no effect on the setup. Making virtual hosts an app is not practical. This is something that needs to remain a manual process. It can break Apache if not careful.

This is something I will document in the wiki. I will package the app but manual work will be required to expose it outside the local network. Most users do not want to be exposed to the internet.

Re: Remote Wake-On-LAN Server

Posted: Fri Jan 23, 2015 8:35 pm
by rdagijones
If you want to wait on packaging the app I think we have a next step to make it better. My friend and I want to add a small MySQL database for adding computers and then change the index.php to add a form for that. I think not having to enter names, mac addresses and ips manually would be a lot more user friendly. We can work out how to hand off the files later. Sound good to you?

Re: Remote Wake-On-LAN Server

Posted: Fri Jan 23, 2015 8:51 pm
by bigfoot65
I may do it anyway and we can update it later. It won't be released LIVE for a while anyways.