i agree with vince: weewx provides a root directory for its html tree, and 
there its responsibility towards nginx ends.
nginx picks up from there, and maps the weewx html root to url location / (if 
the website is dedicated to weewx)
so if weewx root html is /home/weewx/station/public_html then nginx interface 
to weewx would be something like:
server {
  root /home/weewx/station/public_html;
  index index.html;
  location / {
    try_files $uri $uri/ =404;
  }
}
noting that nginx interface to network (server name, ports to listen to etc) 
are in addition.
cheers
⊣GE⊢

> On 3 Jan 2025, at 8:19 am, vince <[email protected]> wrote:
> 
> I've always thought of the how to integrate with a webserver docs as notional 
> rather than step-by-step-do-this-verbatim.
> 
> On Thursday, January 2, 2025 at 1:03:37 PM UTC-8 David VE3STI wrote:
>> My 2016 WeeWX setup recently crashed so I decided to upgrade with a fresh 
>> install with Raspberry Pi OS (Bullseye - I'm using a RPi Zero W as my 
>> dedicated computer) and WeeWX 5.1. I am a complete klutz in Linux so I tried 
>> to follow the installation instructions as closely as possible.
>> 
>> All went well until I began setting up the local web server. I chose nginx 
>> because I have a low power RPi Zero W and because I used nginx in 2016. 
>> Unfortunately, I had long since forgotten how I set it up. I used the 
>> instructions at the GitHub wiki 
>> <https://github.com/weewx/weewx/wiki/Configure-a-web-server-(Apache,-NGINX-or-lighttpd)>.
>>  It suggests adding:
>> 
>> server {
>>   location /weewx {
>>     alias /home/weewx/public_html;
>>   }
>> 
>> to the 'default' file in the </etc/nginx/sites-available/> folder.
>> 
>> However, this did not work with my installation. After much head-scratching, 
>> I edited the 'alias' line to:
>> 
>> alias /var/www/html/weewx/;
>> 
>> Because of my limited knowledge of WeeWX and nginx, I didn't try to fiddle 
>> with the wiki entry. I don't think I did anything out of the ordinary during 
>> the installation. Could these instructions be for an older version of  
>> WeeWX? Maybe someone who knows can figure out if the wiki needs to be 
>> corrected - the current suggestion didn't work for me.
>> 
>> All now seems to be working well with my WeeWX+RPi Zero W+Vantage Vue 
>> weather station setup. I hope this helps someone.
>> 
>> David
>> VE3STI
>> Picton, ON  Canada
> 
> 
> -- 
> 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 [email protected] 
> <mailto:[email protected]>.
> To view this discussion visit 
> https://groups.google.com/d/msgid/weewx-user/86c1677e-a8aa-49fb-aa82-fdfe96d59bfbn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/weewx-user/86c1677e-a8aa-49fb-aa82-fdfe96d59bfbn%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/weewx-user/0AF6A526-A320-4783-AED5-98FCDD915B03%40geddy.au.

Reply via email to