AutomationServer - TasmoAdmin

From The TinkerNet Wiki
Revision as of 10:12, 21 July 2020 by Tinker (talk | contribs) (→‎Fix)
Jump to navigation Jump to search

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...  :)

  • 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
# 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.