I just started with the installation of the software on my ubuntu 12.04 LTS machine to get the energymonitor connected to my HD ready TV with HDMI. I have a couple of sites running on the machine so i would like to have the current setup to monitor my network but I keep failing with installing a new username and gives a red curved box without any message whats wrong. I can access the error logs as well as my access logs on my machine, already put the DEBUG option in Apache but still doesn't work properly.
My system runs Ubuntu 12.04 but its an Zentyal install essentialy, with an system to rewrite www.domain.nl to /var/www/nl/domain.nl/www and i think the problem lies somewhere in this setup so I tryed adding an extra alias option in sites-enabled/000-default like this but did not work also but the page is showing the login page :
ServerName www.greenone.nl
<VirtualHost *:80>
ServerAdmin webmaster@localhost
VirtualDocumentRoot /var/www/%3/%2+/%1/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options -indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel debug
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
Alias /emoncms/ "/var/www/nl/greenone.nl/emoncms/"
<Directory "/var/www/nl/greenone.nl/emoncms/">
Options Indexes MultiViews FollowSymLinks
AllowOverride all
Order deny,allow
Deny from all
Allow from 192.168.
</Directory>
</VirtualHost>
This will be translated to a subdomain like http://emoncms.greenone.nl on the Ubuntu 12.04 LTS server.
This is an small setup for an shared hosting solution so i think it should work with the software, as my websites are correctly served to the visitors. (like http://www.greenone.nl) but http://emoncms.greenone.nl will not login or register new users with no error message only a red box at the login screen.
I tryed downloading the software as well as a regular git clone from the repository but still can't login, I just have ordered my EmonTX v3 so there is no data at the moment, but i would like to add some interfaces already to have a look around in the software.
The user isn't created from within the setup after following the steps at http://emoncms.org/site/docs/installlinux .
I tryed the install procedure Emoncms v7 (redis) where the redis server and packages where installed like a charm, but it still would not work properly, the timestore is running correctly. I did try some variables with changing $path = "/"; in the index.php but that did not help either.
Also tryed some tricks with showing the path in php and this gives my the full path to the files and looks correctly:
<?php
echo getcwd();
?>
Is it possible to create a username and password with an query within PHPmyAdmin or just a plain importable SQL file so i can login and create the admin user ?
Kind regards,
Greenone.
Re: EmonCMS Installing on Ubuntu 12.04 LTS with automatic subdomains
Hello Greenone, it looks like a modrewrite error to me as that login page makes a login request via AJAX to:
http://emoncms.greenone.nl/user/login.json but that returns a server error in your case.
I see you have AllowOverride all which should do it, but there must be something else that's stopping it.
Usually the top entry:
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
would be All too but im not sure in your case.
Re: EmonCMS Installing on Ubuntu 12.04 LTS with automatic subdomains
Hmm did try that in the config but did not help, will be trying to see if I can get the rewrite logging active maybe somethings wrong there but my wordpress sites are running correctly and also having an rewrite enabled with a .htaccess file. I think this would be usefull for the community to get solved so running an Ubuntu as "BaseStation" is also possible.
Re: EmonCMS Installing on Ubuntu 12.04 LTS with automatic subdomains
I changed a couple of settings in the original .htaccess file as following:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
I did have another wordpress which also uses mod_rewrite and I tryed it, and this seems to solve my problem. Cheers! Now lets wait on the EmonTX v3 :-)
Re: EmonCMS Installing on Ubuntu 12.04 LTS with automatic subdomains
In my case i did not have to have the first entry in apache2/sites-enabled/000-default set to all and it still works btw
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
I also changed settings in the index.php file to correspond with my domainname, I tryed this after I saw some errors in the source code after opening the site which pointed to a local location like /var/www/ and instead should be the domainname :
$path = "http://emoncms.greenone.nl/";
Thanks for the support and have a great time!
Re: EmonCMS Installing on Ubuntu 12.04 LTS with automatic subdomains
I got myself an Jeelink v3 for the communication with EmonCMS , running the simple python script with some little adjustments. Will attach the python file i used for this which I found after some troubles with the original EmoncmsPythonLink . I used EmonCMS v7 at the first install point but im using the git version now which seems to work better on some points, and is easy to upgrade with the "git pull" command.
Re: EmonCMS Installing on Ubuntu 12.04 LTS with automatic subdomains
Rather than running under the default config, you could install emoncms separately (i.e. to /usr/share/emoncms/ ) and use a standalone apache config file:
Stick this file in sites-enabled, edit it as you please and apache should serve emoncms from an arbitrary directory for you.
Re: EmonCMS Installing on Ubuntu 12.04 LTS with automatic subdomains
I did convert the config file to an separate file in sites-available and did an a2enmod emoncms to get the symlinks correctly setup. Did work for me in my current apache setup. Thanks! Have fun packaging the emoncms debs, that makes it alot simpler for the basic users.