web page is DEFAULT

83 views
Skip to first unread message

dwright361

unread,
May 13, 2020, 10:15:16 AM5/13/20
to weewx-user
in regards to the web page delivering the WEEWX reports outlined here:

Configure Apache to see the WeeWX reports.

  • If WeeWX was installed from DEB or RPM package, no configuration should be necessary since the reports are placed in the directory /var/www/html/weewx, which is in the Apache DocumentRoot directory /var/www/html

  • If WeeWX was installed using setup.py, you must tell Apache where to find the WeeWX reports. One method is to install an Apache configuration snippet:

    sudo cp util/apache/conf.d/weewx.conf /etc/apache2/conf.d

    Be sure that the path in the Apache configuration snippet matches the HTML_ROOT defined in the WeeWX configuration file. For example, the path for a default setup.py installation would look like this:

    Alias /weewx /home/weewx/public_html
    <Directory /home/weewx/public_html>
        Options FollowSymlinks
        AllowOverride None
    </Directory>

    Restart Apache to make the changes happe



  • I  loaded from the DEB package but as stated above "no further configuration is needed , But I see the Apache default web page at my URL. I assume I need to reconfig a path or file name.

  • How can i resolve this ?
  • Thanks in advance
  • Doug

Phil Green

unread,
May 13, 2020, 12:58:59 PM5/13/20
to weewx-user
On my system I have to state folder /weewx at the end of your url in order to pickup the index.html in the weewx folder under the main root of the url.
Regards
Phil

dwright361

unread,
May 13, 2020, 1:14:11 PM5/13/20
to weewx-user
Phil; I  tried that and I get :

Not Found

The requested URL was not found on this server.


Apache/2.4.25 (Raspbian) Server at 10.10.5.187 Port 80

dwright361

unread,
May 13, 2020, 3:28:58 PM5/13/20
to weewx-user
I think my reports are in the wrong path . the Index.html is the default Debian test page. What folder are the reports from the weather station held?

gjr80

unread,
May 13, 2020, 4:42:39 PM5/13/20
to weewx-user
Hi,

The answer is in your first post:

If WeeWX was installed from DEB or RPM package, no configuration should be necessary since the reports are placed in the directory /var/www/html/weewx, which is in the Apache DocumentRoot directory /var/www/html

I am guessing that since you got a 404 error when you used /weewx in your browser that WeeWX has not placed it’s generated pages in /var/www/html/weewx. This could be because they have been saved elsewhere or more likely they have not been generated at all. I suggest you look in the log, are files being generated and where are they being saved? If you run into difficulties edit weewx.conf, set debug = 1, save weewx.conf and restart WeeWX. Let WeeWX run for 10-15 minutes then take a copy of the log from when you restarted WeeWX through until the 10-15 minutes have elapsed making sure you get the full WeeWX start up. Post the log extract here’s s we will see if we can work out what it going on.

Gary

dwright361

unread,
May 13, 2020, 5:43:59 PM5/13/20
to weewx-user
[ ok ] Stopping weewx (via systemctl): weewx.service.
pi@weewx:~ $ sudo /etc/init.d/weewx start
[ ok ] Starting weewx (via systemctl): weewx.service.
pi@weewx:~ $ tail -f /var/log/syslog
May 13 16:32:29 weewx weewx[6603] CRITICAL __main__:     ****    File "/usr/share/weewx/weewxd", line 148, in main
May 13 16:32:29 weewx weewx[6603] CRITICAL __main__:     ****      engine = weewx.engine.StdEngine(config_dict)
May 13 16:32:29 weewx weewx[6603] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 72, in __init__
May 13 16:32:29 weewx weewx[6603] CRITICAL __main__:     ****      self.preLoadServices(config_dict)
May 13 16:32:29 weewx weewx[6603] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 112, in preLoadServices
May 13 16:32:29 weewx weewx[6603] CRITICAL __main__:     ****      self.stn_info = weewx.station.StationInfo(self.console, **config_dict['Station'])
May 13 16:32:29 weewx weewx[6603] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/station.py", line 51, in __init__
May 13 16:32:29 weewx weewx[6603] CRITICAL __main__:     ****      self.latitude_f      = float(stn_dict['latitude'])
May 13 16:32:29 weewx weewx[6603] CRITICAL __main__:     ****  ValueError: invalid literal for float(): 28.275153 -97.464723
May 13 16:32:29 weewx weewx[6603] CRITICAL __main__:     ****  Exiting.

gjr80

unread,
May 13, 2020, 5:53:54 PM5/13/20
to weewx-user
You have an error with your latitude setting in weewx.conf:

May 13 16:32:29 weewx weewx[6603] CRITICAL __main__: **** ValueError: invalid literal for float(): 28.275153 -97.464723

It looks like you have specified both latitude and longitude for latitude. Edit weewx.conf, fix the error, save weewx.conf and restart WeeWX. Then see if there are any further errors in the log.

Gary

doug wright

unread,
May 13, 2020, 6:23:40 PM5/13/20
to weewx...@googlegroups.com
Permissions denied to save weewx.conf

Sent from my iPhone

> On May 13, 2020, at 4:53 PM, gjr80 <gjrod...@gmail.com> wrote:
>
> You have an error with your latitude setting in weewx.conf:
>
> May 13 16:32:29 weewx weewx[6603] CRITICAL __main__: **** ValueError: invalid literal for float(): 28.275153 -97.464723
>
> It looks like you have specified both latitude and longitude for latitude. Edit weewx.conf, fix the error, save weewx.conf and restart WeeWX. Then see if there are any further errors in the log.
>
> Gary
>
> --
> You received this message because you are subscribed to the Google Groups "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/1a2982db-126d-4518-985a-db6d5ddff551%40googlegroups.com.

Dave Webb KB1PVH

unread,
May 13, 2020, 6:25:14 PM5/13/20
to weewx...@googlegroups.com
Use sudo nano /etc/weewx/weewx.conf

Dave-KB1PVH


Sent from my Galaxy S9

gjr80

unread,
May 13, 2020, 6:27:08 PM5/13/20
to weewx-user
The user account you are using to edit weewx.conf has insufficient privileges, use an account that does have sufficient privileges or prefix you editor command with sudo.

Gary

doug wright

unread,
May 13, 2020, 6:29:44 PM5/13/20
to weewx...@googlegroups.com
Thanks Dave

Sent from my iPhone

On May 13, 2020, at 5:25 PM, Dave Webb KB1PVH <kb1...@gmail.com> wrote:



dwright361

unread,
May 13, 2020, 6:32:29 PM5/13/20
to weewx-user
Gary : I got his now after the LONG LAT fix...
Doug




i@weewx:~ $ sudo /etc/init.d/weewx start
[ ok ] Starting weewx (via systemctl): weewx.service.
pi@weewx:~ $ tail -f /var/log/syslog
May 13 17:28:58 weewx weewx[7592] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/wxservices.py", line 565, in altimeter
May 13 17:28:58 weewx weewx[7592] CRITICAL __main__:     ****      altitude = weewx.units.convertStd(self.altitude_vt, record['usUnits'])
May 13 17:28:58 weewx weewx[7592] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/units.py", line 1270, in convertStd
May 13 17:28:58 weewx weewx[7592] CRITICAL __main__:     ****      return StdUnitConverters[target_std_unit_system].convert(val_t)
May 13 17:28:58 weewx weewx[7592] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/units.py", line 889, in convert
May 13 17:28:58 weewx weewx[7592] CRITICAL __main__:     ****      new_val_t = convert(val_t, new_unit_type)
May 13 17:28:58 weewx weewx[7592] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/units.py", line 1238, in convert
May 13 17:28:58 weewx weewx[7592] CRITICAL __main__:     ****      conversion_func = conversionDict[val_t[1]][target_unit_type]
May 13 17:28:58 weewx weewx[7592] CRITICAL __main__:     ****  KeyError: u'feet'
May 13 17:28:58 weewx weewx[7592] CRITICAL __main__:     ****  Exiting.

gjr80

unread,
May 13, 2020, 6:36:32 PM5/13/20
to weewx-user
WeeWX use the singular for units, so foot not feet. Your altitude setting under [Station] in weewx.conf has feet in it.

Gary

doug wright

unread,
May 13, 2020, 6:52:47 PM5/13/20
to weewx...@googlegroups.com
Yea for that. All is well with displaying the report page. Thanks Gary and Dave.
Doug

Sent from my iPhone

> On May 13, 2020, at 5:36 PM, gjr80 <gjrod...@gmail.com> wrote:
>
> WeeWX use the singular for units, so foot not feet. Your altitude setting under [Station] in weewx.conf has feet in it.
>
> Gary
>
> --
> You received this message because you are subscribed to the Google Groups "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/91f49ab9-4efb-4101-8cde-08adc013f62c%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages