Minggu, 28 Desember 2014

Bristol Digest, Vol 582, Issue 3

Send Bristol mailing list submissions to
bristol@mailman.lug.org.uk

To subscribe or unsubscribe via the World Wide Web, visit
https://mailman.lug.org.uk/mailman/listinfo/bristol
or, via email, send a message with subject or body 'help' to
bristol-request@mailman.lug.org.uk

You can reach the person managing the list at
bristol-owner@mailman.lug.org.uk

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Bristol digest..."


Today's Topics:

1. Re: DyGraph (Pi) (Peter Hemmings)
2. Re: DyGraph (Pi) (Chris)
3. Re: DyGraph (Pi) (Peter Hemmings)
4. Re: DyGraph (Pi (Chris)
5. Re: DyGraph (Pi (Peter Hemmings)


----------------------------------------------------------------------

Message: 1
Date: Sat, 27 Dec 2014 12:32:53 +0000
From: Peter Hemmings <peter@hemmings.eclipse.co.uk>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] DyGraph (Pi)
Message-ID: <549EA6F5.5030608@hemmings.eclipse.co.uk>
Content-Type: text/plain; charset=windows-1252; format=flowed

Seasons Greetings to all lurkers and active members.

Update:

Pi continues to work outputting humidity/temperature data into
"temp.log" so the first script and cron job is OK.
As Apache does not accept symlinks I copied data into a static
"temp.log" to test scripts before looking at apache.

I still could not get it to work on the Pi.
I copied data csv file (temp.log), html file "temp.html" (dygraph
script) and dygraph-combined.js from Pi to fc19 laptop and took it to KT
last week and it worked!

The files are in /var/www/html/ on fc19 and in /var/www/ on Raspian Pi.

To keep things simple and try to avoid typos, I deleted files on Pi and
copied them back from fc19 that worked!

Pi comes with two "cut-down" browsers "Epiphany" and "NetSurf".

Checked local IP address and that apache2 was running OK on Pi, but got
nothing on both Browsers (just blank page, no graphs or errors).

As my Pi is now on a larger SD card, I installed "Chromium".

Tried it, and it works!!

So why could this be, is it to do with font characters, I did see an
error on a concole stating html not defined (or something like that!)?

I can now manually change the csv file and see the graph change but only
on "Chromium".

I have been looking at the "Alias" command in apache on the Pi but it
fails to point to my temp.log file.

What I am trying to do is serve my dynamic /home/pi/temp.log by making
it available in /var/www/.

I tried to put something in /etc/apache2/sites-enabled/000-default but
no luck atm so if there is a Pi/Apache2 expert on the list, I would
appreciate any pointers!?


Regards

--
Peter H



------------------------------

Message: 2
Date: Sat, 27 Dec 2014 19:02:02 +0000
From: Chris <cshorler@googlemail.com>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] DyGraph (Pi)
Message-ID: <CD8D4975-FFA9-4EF7-AB78-CE6E8F5FC5FA@googlemail.com>
Content-Type: text/plain; charset=UTF-8

On 27 December 2014 12:32:53 GMT+00:00, Peter Hemmings <peter@hemmings.eclipse.co.uk> wrote:
>Seasons Greetings to all lurkers and active members.
>
>Update:
>
>Pi continues to work outputting humidity/temperature data into
>"temp.log" so the first script and cron job is OK.
>As Apache does not accept symlinks I copied data into a static
>"temp.log" to test scripts before looking at apache.
>
>I still could not get it to work on the Pi.
>I copied data csv file (temp.log), html file "temp.html" (dygraph
>script) and dygraph-combined.js from Pi to fc19 laptop and took it to
>KT
>last week and it worked!
>
>The files are in /var/www/html/ on fc19 and in /var/www/ on Raspian Pi.
>
>To keep things simple and try to avoid typos, I deleted files on Pi
>and
>copied them back from fc19 that worked!
>
>Pi comes with two "cut-down" browsers "Epiphany" and "NetSurf".
>
>Checked local IP address and that apache2 was running OK on Pi, but got
>
>nothing on both Browsers (just blank page, no graphs or errors).
>
>As my Pi is now on a larger SD card, I installed "Chromium".
>
>Tried it, and it works!!
>
>So why could this be, is it to do with font characters, I did see an
>error on a concole stating html not defined (or something like that!)?
>
>I can now manually change the csv file and see the graph change but
>only
>on "Chromium".
>
>I have been looking at the "Alias" command in apache on the Pi but it
>fails to point to my temp.log file.
>
>What I am trying to do is serve my dynamic /home/pi/temp.log by making
>it available in /var/www/.
>
>I tried to put something in /etc/apache2/sites-enabled/000-default but
>no luck atm so if there is a Pi/Apache2 expert on the list, I would
>appreciate any pointeresource
19

If the pi is running a web server (Apache), you don't need to fire up a web browser on the pi to access it. You can use your laptop browser and enter the pi as the server.

http://pi-ip-addr/path/to/resource
(Note if your page is not the default index, then you will need to specify a filename e.g. test.html if that's what you called your example)

If it doesn't work you can dig deeper by watching the network interactions and for JavaScript errors in the console in the browser development tools (Firefox or Chromium as we saw at the LUG)

If it points to a resource issue, you might need to tweak something on the pi (move a resource or tweak the Apache config). Perhaps the sub-directory on your FC19 is important.

>Regards





------------------------------

Message: 3
Date: Sat, 27 Dec 2014 20:55:47 +0000
From: Peter Hemmings <peter@hemmings.eclipse.co.uk>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] DyGraph (Pi)
Message-ID: <549F1CD3.5080204@hemmings.eclipse.co.uk>
Content-Type: text/plain; charset=windows-1252; format=flowed


>> I tried to put something in /etc/apache2/sites-enabled/000-default
>> but no luck atm so if there is a Pi/Apache2 expert on the list, I
>> would appreciate any pointeresource
> 19
>
> If the pi is running a web server (Apache), you don't need to fire up
> a web browser on the pi to access it. You can use your laptop
> browser and enter the pi as the server.
>
> http://pi-ip-addr/path/to/resource

Yep that is no problem, I can see it on the laptop OK, I was using the
pi browser for ease of use.

> (Note if your page is not the default index, then you will need to
> specify a filename e.g. test.html if that's what you called your
> example)

I have now added the following in 000-default in an attempt for apache2
to find my data now cronned into /home/pi/www/temp.log but its not
finding it:

Alias /var/www/ "home/pi/www/"
<Directory "/home/pi/www/">
order allow,deny
Allow from all
Require all granted
Options Indexes FollowSymLinks
<Directory>

Restarted apache and tried "Local IP/temp.html thinking it would then
find the temp.log data in /home/pi/www/ but it doesn't and I need to check.

There were no errors when I restarted apache so my additions seem OK
syntax wise!

I am attempting to use the original Dygraph program and the script to
generate the graph from /var/www/ and pick up the data from /home/pi/www/

I renamed the temp.log (the static one that worked) from /var/www/ so
that I it would look in /home/pi/www/, but it didn't.
>
> If it doesn't work you can dig deeper by watching the network
> interactions and for JavaScript errors in the console in the browser
> development tools (Firefox or Chromium as we saw at the LUG)
>
> If it points to a resource issue, you might need to tweak something
> on the pi (move a resource or tweak the Apache config). Perhaps the
> sub-directory on your FC19 is important.

Used Chrome JS console on laptop and it reported failed to find resource
"temp.log".

So I am now satisfied that all is working except configuring the server
to pick up the temp.log file generated by my new cron job.

This is no longer a priority as I have cured the damp problem I was
going to use it on!

However it would be a shame to stop now as I have almost got it all to
work.

I will do some more reading on configuring apache to read other
directories (symlinks were not recommended).

>
>> Regards
>
>
>
> _______________________________________________ Bristol mailing list
> Bristol@mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/bristol
>

PS: just realized that only "temp.log" is specified in "temp.html" to
generate the graph. I assume I will either need to add the path or put
everything in /home/pi/www/



Regards
--
Peter H



------------------------------

Message: 4
Date: Sun, 28 Dec 2014 09:17:34 +0000
From: Chris <cshorler@googlemail.com>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] DyGraph (Pi
Message-ID: <F70A7567-5E93-40E6-96A4-BBFE6D2C980F@googlemail.com>
Content-Type: text/plain; charset=UTF-8

On 27 December 2014 20:55:47 GMT+00:00, Peter Hemmings <peter@hemmings.eclipse.co.uk> wrote:
>
>>> I tried to put something in /etc/apache2/sites-enabled/000-default
>>> but no luck atm so if there is a Pi/Apache2 expert on the list, I
>>> would appreciate any pointeresource
>> 19
>>
>> If the pi is running a web server (Apache), you don't need to fire up
>> a web browser on the pi to access it. You can use your laptop
>> browser and enter the pi as the server.
>>
>> http://pi-ip-addr/path/to/resource
>
>Yep that is no problem, I can see it on the laptop OK, I was using the
>pi browser for ease of use.
>
>> (Note if your page is not the default index, then you will need to
>> specify a filename e.g. test.html if that's what you called your
>> example)
>
>I have now added the following in 000-default in an attempt for apache2
>
>to find my data now cronned into /home/pi/www/temp.log but its not
>finding it:
>
>Alias /var/www/ "home/pi/www/"
><Directory "/home/pi/www/">
>order allow,deny
>Allow from all
>Require all granted
>Options Indexes FollowSymLinks
><Directory>
>
>Restarted apache and tried "Local IP/temp.html thinking it would then
>find the temp.log data in /home/pi/www/ but it doesn't and I need to
>check.
>
>There were no errors when I restarted apache so my additions seem OK
>syntax wise!
>
>I am attempting to use the original Dygraph program and the script to
>generate the graph from /var/www/ and pick up the data from
>/home/pi/www/
>
>I renamed the temp.log (the static one that worked) from /var/www/ so
>that I it would look in /home/pi/www/, but it didn't.
>>
>> If it doesn't work you can dig deeper by watching the network
>> interactions and for JavaScript errors in the console in the browser
>> development tools (Firefox or Chromium as we saw at the LUG)
>>
>> If it points to a resource issue, you might need to tweak something
>> on the pi (move a resource or tweak the Apache config). Perhaps the
>> sub-directory on your FC19 is important.
>
>Used Chrome JS console on laptop and it reported failed to find
>resource
>"temp.log".
>
>So I am now satisfied that all is working except configuring the server
>
>to pick up the temp.log file generated by my new cron job.
>
>This is no longer a priority as I have cured the damp problem I was
>going to use it on!
>
>However it would be a shame to stop now as I have almost got it all to
>work.
>
>I will do some more reading on configuring apache to read other
>directories (symlinks were not recommended).
>
>>
>>> Regards
>>
>>
>>
>> _______________________________________________ Bristol mailing list
>> Bristol@mailman.lug.org.uk
>> https://mailman.lug.org.uk/mailman/listinfo/bristol
>>
>
>PS: just realized that only "temp.log" is specified in "temp.html" to
>generate the graph. I assume I will either need to add the path or put
>
>everything in /home/pi/www/
>
>
>
>Regards

I think you may be over complicating it... did you read this: ?

http://httpd.apache.org/docs/2.2/howto/public_html.html

Sub heading per-user web directories

Or put the file under /var/www

I doubt you need to configure alias




------------------------------

Message: 5
Date: Sun, 28 Dec 2014 11:07:26 +0000
From: Peter Hemmings <peter@hemmings.eclipse.co.uk>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] DyGraph (Pi
Message-ID: <549FE46E.5090005@hemmings.eclipse.co.uk>
Content-Type: text/plain; charset=windows-1252; format=flowed

On 28/12/14 09:17, Chris wrote:
> I think you may be over complicating it... did you read this: ?

!

I have now.

>
> http://httpd.apache.org/docs/2.2/howto/public_html.html
>
> Sub heading per-user web directories
>
> Or put the file under /var/www


I assume you mean cron job it to /var/www/.

I had not tried that because I was not sure if there would be permission
problems.

>
> I doubt you need to configure alias
>

Agreed

It seems that if I am testing with Fedora I also need to set SELinux to
allow htppd to read any files in my directory, so will go back and try
on pi only!

I will check to find if module "mod_userdir" is loaded as well.

Will have another go at it later.

Regards
--
Peter H



------------------------------

_______________________________________________
Bristol mailing list
Bristol@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/bristol

End of Bristol Digest, Vol 582, Issue 3
***************************************

Tidak ada komentar:

Posting Komentar