Gary:
more - i've been studying the nginx package. I followed the configuration 
file links. they start at /etc/nginx in the nginx.conf file. It links 
/etc/nginx/sites-enabled; which redirects to /etc/nginx/sites-avaialble. 
that configuration file links to 'default' which has a declaration to 
include 'root' with /var/www/html which contains the first mention of 
weewx; that links is a redirection to /home/weewx/public_html directory. No 
mention of belchertown anywhere. 

I'm thinking that I need a reference to the 
"/home/weewx/public_html/weewx/belchertown" somewhere in this chain, 
otherwise nginx can't find the config, html and image files. what do you 
think? attached is a text file of my findings on the nginx configuration 
setup.
/David

On Tuesday, March 9, 2021 at 12:56:47 PM UTC-8 David Prellwitz wrote:

> Gary:
> yes to all. here's some examples. First file is a set of extracts from 
> syslog; then annotated extracts from the index.html files in ../public_html 
> and ../public_html/weewx/belchertown directories; then an annotated tree 
> structure taken at /home/weewx/public_html; then screen shots from 
> http://192.168.86.28/  - then screen shot from http://192.168.86.28/weewx 
> and last from http://192.168.86.28/weewx/belchertown . as i noted in my 
> extracts, both the index files show current info (i think). When i look in 
> /home/weewx/public_html/weewx directory it's empty except for the 
> /belchertown subdirectory.  I also did "locate" commands for all 
> occurrences of "index.html" and nothing seemed out of place. So, i'm not 
> sure where weewx and belchertown execution put their respective web files. 
> Nor am i aware of where nginx will pick up those files. It seems that the 
> default weewx skin operates correctly, that means weewx is operational and 
> correct (i think). the syslog shows that weewx generates reports for 
> belchertown using the skin.conf in belchertown skins directory. almost all 
> of the features of belchertown skin seem to be working... so i'm officially 
> lost! thanks for the assistance.
>
>
> On Tuesday, March 9, 2021 at 2:21:19 AM UTC-8 gjr80 wrote:
>
>> Just to remove all possibility of misinterpretation with abbreviated 
>> paths etc. You are saying /home/weewx/public_html/weewx/index.html and 
>> /home/weewx/public_html/weewx/belchertown/index.html both exist and 
>> appear to be current? And also when you put http://192.168.86.28/weewx 
>> into your browser it displays the Seasons skin main page and the data is 
>> current, but when you use http://192.168.86.28/weewx/belchertown you get 
>> a 404 error?
>>
>> Gary
>>
>> On Tuesday, 9 March 2021 at 20:08:20 UTC+10 [email protected] wrote:
>>
>>> Gary, they seem to be current. I read index.html files in 
>>> ../public_html/weewx/ and /belchertown and they shows labels and some epoch 
>>> time that appears to be current. All the files in /public_html, weewx and 
>>> belchertown all seems to have current files. I still get a 404 error when 
>>> trying to open. default skin/browser still works. 
>>> /David
>>> On Tuesday, March 9, 2021 at 1:06:24 AM UTC-8 gjr80 wrote:
>>>
>>>> Yes, deleting while tired is to be avoided. Interrupting a reporting 
>>>> cycle is not critical, just means you probably deleted some files that 
>>>> WeeWX had just generated, WeeWX will get over it.
>>>>
>>>> So forgetting about the browser, does 
>>>> /home/weewx/public_html/weewx/belchertown contain any files and 
>>>> directories? Are they current, check the content with an editor. If they 
>>>> are current your issue is an nginx config issue, if they are not current 
>>>> then you have a really bizarre WeeWX/Belchertown skin problem.
>>>>
>>>> Gary
>>>>
>>>> On Tuesday, 9 March 2021 at 18:48:15 UTC+10 [email protected] 
>>>> wrote:
>>>>
>>>>> Gary:
>>>>> well, i should not make major changes while tired.... I 
>>>>> (unfortunately) wiped out my own user directory ("/home/david/...) so 
>>>>> i'll 
>>>>> have to live with that. Lost some files and copies of modified conf 
>>>>> files, 
>>>>> but not much else was lost... 
>>>>>
>>>>> I did wipe out the contents of public_html directory and it's 
>>>>> subdirectories. I must have interrupted a reporting cycle as syslog had 
>>>>> some serious errors. once i restarted weewx it all ran successfully. 
>>>>> However, still no joy. Now when i go to 
>>>>> http://192,168.86.28/weewx/belchertown 
>>>>> i get a 404 error (not found). the default skin 
>>>>> (http://192,168.86.28/weewx) 
>>>>> runs fine. Files all seem to have a current date/time, but i still don't 
>>>>> get a belchertown page loaded.
>>>>> /David
>>>>>
>>>>> On Monday, March 8, 2021 at 10:11:54 PM UTC-8 gjr80 wrote:
>>>>>
>>>>>> OK. Let's forget about the browser for the time being and work with 
>>>>>> the files in /home/weewx/public_html, get them right and the browser 
>>>>>> will fall into place. Since you have made various changes to where WeeWX 
>>>>>> generated files are going, but seem to have that set correctly now, go 
>>>>>> ahead and delete everything in /home/weewx/public_html. Everything 
>>>>>> includes files and directories. WeeWX will re-generate it all on the 
>>>>>> next 
>>>>>> report cycle, then next report cycle might take a little longer 
>>>>>> depending 
>>>>>> on how much historical data you have as WeeWX will re-generate all NOAA 
>>>>>> format files. No need to stop/start or restart WeeWX, just make sure 
>>>>>> that 
>>>>>> you get everything deleted before a report cycle starts and not during.
>>>>>>
>>>>>> Monitor the log and once that next report cycle has completed have a 
>>>>>> look at what files/directories are where in /home/weewx/public_html 
>>>>>> and when are they timestamped.
>>>>>>
>>>>>> Gary
>>>>>>
>>>>>> On Tuesday, 9 March 2021 at 15:53:24 UTC+10 [email protected] 
>>>>>> wrote:
>>>>>>
>>>>>>> Gary:
>>>>>>> no joy. changed weewx.conf to show Belchertown HTML_ROOT as you 
>>>>>>> suggested ("/home/weewx/public_html/weewx/belchertown"), stopped weewx, 
>>>>>>> started weewx, ran weewx status. waited for updates, browsed to 
>>>>>>> http://192.168.86.28/weewx and got the original weewx skin with 
>>>>>>> correct info. Then browsed to http://192.168.86.28/weewx/belchertown 
>>>>>>> and got the old belchertown skin with March 6, 2021 at 1:55 pm. (Same 
>>>>>>> problem i started with.) no errors or problems indicated on syslog, 
>>>>>>> debug 
>>>>>>> or messages. I checked the file/directory structure in 
>>>>>>> /home/weewx/public_html and see that there is a belchertown and a weewx 
>>>>>>> subdirectories. However, the files in /home/public_html/belchertown 
>>>>>>> show a 
>>>>>>> date of Mar 6, 2021 at 13:55 - same as the offending pages. When i 
>>>>>>> checked 
>>>>>>> the .../public_html/belchertown directory, However, there is NOT a 
>>>>>>> /home/weewx/publich_html/weewx/belchertown subdirectory. 
>>>>>>>
>>>>>>> More interesting stuff: i looked at the index.html file in 
>>>>>>> "../public_html/weewx" directory and it has the correct belchertown 
>>>>>>> date/time and it contains the corrected labels/headers and chart 
>>>>>>> specifics 
>>>>>>> i'd modified. When i looked at the index.html file in 
>>>>>>> "../public_html/belchertown" directory it contains the March 6 layout 
>>>>>>> (first modifications to only change the title name). Whatever is 
>>>>>>> happening 
>>>>>>> means wherever weewx is putting the html files for the newer 
>>>>>>> Belchertown 
>>>>>>> files is not the same place that the web engine (nginx) is not picking 
>>>>>>> them 
>>>>>>> up from. 
>>>>>>> /D
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Monday, March 8, 2021 at 12:28:19 AM UTC-8 gjr80 wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I suggest as a start you edit weewx.conf, set debug=1, save 
>>>>>>>> weewx.conf and the restart WeeWX. Let WeeWX run for at least two 
>>>>>>>> report 
>>>>>>>> cycles and then post a log extract here showing the entire WeeWX 
>>>>>>>> startup 
>>>>>>>> and the two report cycles. Then we can see what WeeWX and the skins 
>>>>>>>> are 
>>>>>>>> doing.
>>>>>>>>
>>>>>>>> Gary
>>>>>>>>
>>>>>>>> On Monday, 8 March 2021 at 15:30:41 UTC+10 [email protected] 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> lecoqacr - i can access the belchertown link from my mobile, which 
>>>>>>>>> is sharing the same meshed net. Interesting, both Belchertown 
>>>>>>>>> homepages 
>>>>>>>>> show a "last updated" date as yesterday noon; i've restarted all 
>>>>>>>>> aspects of 
>>>>>>>>> this machine (Debian 10 on a Dell laptop), from the laptop thru weewx 
>>>>>>>>> (three times) and wee-reports (atleast 10 times). but all of the 
>>>>>>>>> Belchertown pages show yesterday noon as the last update. However, 
>>>>>>>>> the 
>>>>>>>>> Weewx default skin updates and shows current data. That's why i think 
>>>>>>>>> its 
>>>>>>>>> an issue with my weewx.conf/skin.conf/graphs.conf files - and/or 
>>>>>>>>> their 
>>>>>>>>> location...
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Sunday, March 7, 2021 at 7:23:41 PM UTC-8 [email protected] 
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Maybe this thread is what you are having a problem with.
>>>>>>>>>>
>>>>>>>>>>  
>>>>>>>>>> https://groups.google.com/g/weewx-user/c/qUt0XdqREqk/m/O-wO1GiVAwAJ
>>>>>>>>>> Try going to another computer on the network and enter the 
>>>>>>>>>> address of the weewx belchertown address computer.
>>>>>>>>>>
>>>>>>>>>> On Sun, Mar 7, 2021 at 7:12 PM David Prellwitz <
>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>
>>>>>>>>>>> More info - looking at syslog, i notice that 8, 11, 15 season 
>>>>>>>>>>> files generated, but  are written to /home/weewx/public_html. 
>>>>>>>>>>> Sometimes 
>>>>>>>>>>> i'll get 2 files written to /home/weewx/public_html/weewx.  But, 
>>>>>>>>>>> still no 
>>>>>>>>>>> updates on belchertown web page. I'm now officially confused as to 
>>>>>>>>>>> where 
>>>>>>>>>>> skin.conf, graphs.conf need to be in relationship to /home/weewx. 
>>>>>>>>>>> /David
>>>>>>>>>>> On Sunday, March 7, 2021 at 1:36:35 PM UTC-8 David Prellwitz 
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> New issue; i can't get graphs.conf to work, irrespective of 
>>>>>>>>>>>> where i put it. It's now in /home/weewx/skins/belchertown 
>>>>>>>>>>>> directory with 
>>>>>>>>>>>> graphs.conf.example file. I've even changed example filename - 
>>>>>>>>>>>> still can't 
>>>>>>>>>>>> get belchertown skin to use the minor changes i made to the 
>>>>>>>>>>>> graphs. It has 
>>>>>>>>>>>> to be a configuration issue, something i've overlooked. help!
>>>>>>>>>>>> /David
>>>>>>>>>>>>
>>>>>>>>>>>> On Saturday, March 6, 2021 at 3:35:15 PM UTC-8 David Prellwitz 
>>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> kool! thanks!
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Saturday, March 6, 2021 at 3:23:04 PM UTC-8 
>>>>>>>>>>>>> [email protected] wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Try localhost/weewx/belchertown
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Dave - KB1PVH
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Sent from my Galaxy S21
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Sat, Mar 6, 2021, 6:12 PM David Prellwitz <
>>>>>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I installed the Belchertown skin; configured weewx.conf and 
>>>>>>>>>>>>>>> skin.conf; stopped and started weewx; corrected duplication 
>>>>>>>>>>>>>>> error in 
>>>>>>>>>>>>>>> weewx.conf and stopped/restarted weews - no errors. Checked 
>>>>>>>>>>>>>>> file date/times 
>>>>>>>>>>>>>>> in /home/weewx/public_html/Belchertown_html directory and files 
>>>>>>>>>>>>>>> are being 
>>>>>>>>>>>>>>> updated.  However, when i look at 'localhost/weewx' i get the 
>>>>>>>>>>>>>>> original 
>>>>>>>>>>>>>>> skin. when i enter 192.168.82.24 (url of this machine) i get 
>>>>>>>>>>>>>>> the nginx 
>>>>>>>>>>>>>>> welcome screen.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I believe it's a config or a setup issue on my part, but i 
>>>>>>>>>>>>>>> don't know where to look. I'm sure i've failed to link the 
>>>>>>>>>>>>>>> Belchertown skin 
>>>>>>>>>>>>>>> to the web engine, just not sure how that link is setup. 
>>>>>>>>>>>>>>> Suggestions as to 
>>>>>>>>>>>>>>> where to look?
>>>>>>>>>>>>>>> /David
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>> 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 on the web visit 
>>>>>>>>>>>>>>> https://groups.google.com/d/msgid/weewx-user/0032546b-89c0-4176-9b58-0cf14a698635n%40googlegroups.com
>>>>>>>>>>>>>>>  
>>>>>>>>>>>>>>> <https://groups.google.com/d/msgid/weewx-user/0032546b-89c0-4176-9b58-0cf14a698635n%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 on the web visit 
>>>>>>>>>>> https://groups.google.com/d/msgid/weewx-user/929bfde0-c860-4105-9fcd-89551acdfa88n%40googlegroups.com
>>>>>>>>>>>  
>>>>>>>>>>> <https://groups.google.com/d/msgid/weewx-user/929bfde0-c860-4105-9fcd-89551acdfa88n%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 on the web visit 
https://groups.google.com/d/msgid/weewx-user/b4b616b5-2060-42b5-89af-84a630120126n%40googlegroups.com.
###
###   listing of various NGINX configuration files - trying to follow load 
sequences - first is nginx.conf,
###         On line (in this doc) 65, it "includes" the directory 
/etc/ngnix/sites-enabled, which has a file
###         named 'default' which redirects to '/etc/ngnix/sites-available' and 
the file 'default' This commentary contines at line 91
###
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##

        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # SSL Settings
        ##

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        ##
        # Gzip Settings
        ##

        gzip on;

        # gzip_vary on;
        # gzip_proxied any;
        # gzip_comp_level 6;
        # gzip_buffers 16 8k;
        # gzip_http_version 1.1;
        # gzip_types text/plain text/css application/json 
application/javascript text/xml application/xml application/xml+rss 
text/javascript;

        ##
        # Virtual Host Configs
        ##

        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}


#mail {
#       # See sample authentication script at:
#       # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
# 
#       # auth_http localhost/auth.php;
#       # pop3_capabilities "TOP" "USER";
#       # imap_capabilities "IMAP4rev1" "UIDPLUS";
# 
#       server {
#               listen     localhost:110;
#               protocol   pop3;
#               proxy      on;
#       }
# 
#       server {
#               listen     localhost:143;
#               protocol   imap;
#               proxy      on;
#       }
#}
###
### here is a "ls -lth" of the '../sites-enabled' directory - the 'default' 
file redirects to '../sites-avalable'
###
total 0
lrwxrwxrwx 1 root root 34 Feb 16 20:30 default -> 
/etc/nginx/sites-available/default
###
###  here's a 'ls -lth' of the /etc/nginx/sites-available subdirectory:
###
total 4.0K
-rw-r--r-- 1 root root 2.4K Aug 24  2020 default
###
###  here is the listing of the 'default' file located at 
/etc/nginx/sites-available
###      notice line 145 - it directs the root as '/var/www/html' which is were 
weewx is
###      finally listed. 
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
#
# This file will automatically load configuration files provided by other
# applications, such as Drupal or Wordpress. These applications will be made
# available underneath a path with that package name, such as /drupal8.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##

# Default server configuration
#
server {
        listen 80 default_server;
        listen [::]:80 default_server;

        # SSL configuration
        #
        # listen 443 ssl default_server;
        # listen [::]:443 ssl default_server;
        #
        # Note: You should disable gzip for SSL traffic.
        # See: https://bugs.debian.org/773332
        #
        # Read up on ssl_ciphers to ensure a secure configuration.
        # See: https://bugs.debian.org/765782
        #
        # Self signed certs generated by the ssl-cert package
        # Don't use them in a production server!
        #
        # include snippets/snakeoil.conf;

        root /var/www/html;

        # Add index.php to the list if you are using PHP
        index index.html index.htm index.nginx-debian.html;

        server_name _;

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;
        }

        # pass PHP scripts to FastCGI server
        #
        #location ~ \.php$ {
        #       include snippets/fastcgi-php.conf;
        #
        #       # With php-fpm (or other unix sockets):
        #       fastcgi_pass unix:/run/php/php7.3-fpm.sock;
        #       # With php-cgi (or other tcp sockets):###

        #       fastcgi_pass 127.0.0.1:9000;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #       deny all;
        #}
}


# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
#server {
#       listen 80;
#       listen [::]:80;
#
#       server_name example.com;
#
#       root /var/www/example.com;
#       index index.html;
#
#       location / {
#               try_files $uri $uri/ =404;
#       }
#}
###
### here is an 'ls -lth' for the '/var/www/html' directory.
###     Notice that weewx is redirected to '/home/weewx/public_html' directory 
structure. No mention of 'weewx/belchertown' 
###
total 4.0K
lrwxrwxrwx 1 root root  23 Feb 16 20:30 weewx -> /home/weewx/public_html
-rw-r--r-- 1 root root 612 Feb 16 20:30 index.nginx-debian.html

Reply via email to