Difference between revisions of "AutomationServer - TasmoAdmin"
Jump to navigation
Jump to search
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
[https://github.com/reloxx13/TasmoAdmin TasmoAdmin] | [https://github.com/reloxx13/TasmoAdmin TasmoAdmin] | ||
+ | ==Installation== | ||
There are a couple items in the instructions for installing under Linux that are just plain wrong when running an up-to-date Mint-based server. But now you can just copy-pasta from this page... :) | There are a couple items in the instructions for installing under Linux that are just plain wrong when running an up-to-date Mint-based server. But now you can just copy-pasta from this page... :) | ||
Line 30: | Line 29: | ||
*<code>sudo vim /etc/apache2/ports.conf</code> | *<code>sudo vim /etc/apache2/ports.conf</code> | ||
+ | |||
+ | ADD IN "Listen 9999" to the ports.conf file like this: | ||
<syntaxhighlight lang="apacheconf"> | <syntaxhighlight lang="apacheconf"> | ||
Line 54: | Line 55: | ||
*<code>sudo service apache2 restart</code> | *<code>sudo service apache2 restart</code> | ||
+ | ==Troubleshooting== | ||
+ | |||
+ | ===Problem=== | ||
+ | On opening the start page all i was presented with was: | ||
+ | |||
+ | <code>array(3) { [0]=> array(7) { ["file"]=> string(50)</code> | ||
+ | |||
+ | <code>...</code> | ||
+ | |||
+ | <code>string(12) "include_once" } } could not read MyConfig.json in read</code> | ||
+ | |||
+ | (Screen full of gibberish...) | ||
+ | |||
+ | ====Fix==== | ||
+ | SSH into the server & check the '''MyConfig.json''' file: | ||
+ | |||
+ | *<code>ls -l /var/www/tasmoadmin/tasmoadmin/data/</code> | ||
+ | |||
+ | If it is zero-length, delete it. | ||
+ | |||
+ | *<code>sudo rm /var/www/tasmoadmin/tasmoadmin/data/MyConfig.json</code> | ||
+ | |||
+ | Refresh the webpage. | ||
[[Category:IoT]] | [[Category:IoT]] | ||
[[Category:AutomationServer]] | [[Category:AutomationServer]] | ||
[[Category:TasmOTA]] | [[Category:TasmOTA]] |
Latest revision as of 03:08, 12 September 2020
Installation
There are a couple items in the instructions for installing under Linux that are just plain wrong when running an up-to-date Mint-based server. But now you can just copy-pasta from this page... :)
sudo apt-get update && sudo apt-get install apache2 php libapache2-mod-php php7.2-curl php7.2-zip git vim
sudo git clone https://github.com/reloxx13/TasmoAdmin.git /var/www/tasmoadmin
sudo chown -R www-data:www-data /var/www/tasmoadmin
sudo chmod 777 /var/www/tasmoadmin/tasmoadmin/tmp && sudo chmod 777 /var/www/tasmoadmin/tasmoadmin/data
sudo rm /etc/php/7.2/apache2/conf.d/10-opcache.ini
sudo vim /etc/apache2/sites-available/tasmoadmin.conf
<VirtualHost *:9999>
ServerName tasmoadmin
ServerAdmin webmaster@localhost
DocumentRoot /var/www/tasmoadmin/tasmoadmin
<Directory /var/www/tasmoadmin/tasmoadmin>
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
</VirtualHost>
sudo vim /etc/apache2/ports.conf
ADD IN "Listen 9999" to the ports.conf file like this:
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
Listen 80
Listen 9999
<IfModule ssl_module>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
sudo a2ensite tasmoadmin
sudo a2enmod rewrite
sudo service apache2 restart
Troubleshooting
Problem
On opening the start page all i was presented with was:
array(3) { [0]=> array(7) { ["file"]=> string(50)
...
string(12) "include_once" } } could not read MyConfig.json in read
(Screen full of gibberish...)
Fix
SSH into the server & check the MyConfig.json file:
ls -l /var/www/tasmoadmin/tasmoadmin/data/
If it is zero-length, delete it.
sudo rm /var/www/tasmoadmin/tasmoadmin/data/MyConfig.json
Refresh the webpage.