Author Topic: Changing Weewx HTML Location  (Read 537 times)

0 Members and 1 Guest are viewing this topic.

Offline TinkerTown

  • Senior Member
  • **
  • Posts: 68
Changing Weewx HTML Location
« on: January 23, 2021, 06:28:41 AM »
Hi All,

I am hoping someone can help me change the location of the website (using the Belchertown Skin) to /var/www/html on the Acpahe website on the same server. I have tried following the instructions on github that prolabs said he did, but it doesn't work.

This is what he put, which I have tried and no luck. At best I get apache to list the contents of the /var/www/html folder after I do as instructed. I am not a big user of linux, so I am probably missing something.

I am running Ubuntu 20.04.

This is what I was following:

This is what worked for me to make Belchertown the default skin for your site. This is an example config and may need a little fine-tuning site-per-site.

I changed it so the standard skin would be in a subfolder, and the main folder has my skin files. So when you go to my website you're seeing the Belchertown skin, with the default skin under /weewx.

    Edit weewx.conf, then look for [StdReport] and under it change HTML_ROOT to be /var/www/html/weewx. Note, your HTML directory may be /home/weewx/public_html, so you'd want /home/weewx/public_html/weewx.

    Then modify the Belchertown skin options with these minimal updates. Note, you may need to change the path as mentioned above.

    [[Belchertown]]
        HTML_ROOT = /var/www/html
        skin = Belchertown

    This is optional, but advised: Delete all contents of the HTML_ROOT folder and let Belchertown create an entire new site. This prevents stale duplicate data.

    Restart weewx and let it generate the files upon the next archive interval.


Ecowitt GW1000 | WS-2902C |Weewx on Raspberry Pi
WU: KNMLOVIN14  |  PWSweather: PWSLOVNM1
CWOP: FW9112; https://lovingtonweather.com

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3334
Re: Changing Weewx HTML Location
« Reply #1 on: January 23, 2021, 01:38:48 PM »
Does the directory /var/www/html/weewx exist ?
--> ls /var/www/html -l
If not, you have to create it as user root
sudo mkdir /var/www/html/weewx

Did you give permission to Apache to read your new html directory ?
try:
sudo chmod -R 755 /var/www/html/weewx

then you should be able to read the content of the /var/www/html/weewx directory via a browser:
http://your-ip/weewx

If you are logged in as user root (usually the # prompt), you don't need the "sudo"

P.S. "-->" means: look by entering the command
« Last Edit: January 23, 2021, 01:41:53 PM by Gyvate »
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline TinkerTown

  • Senior Member
  • **
  • Posts: 68
Re: Changing Weewx HTML Location
« Reply #2 on: January 24, 2021, 08:12:10 PM »
Does the directory /var/www/html/weewx exist ?
--> ls /var/www/html -l
If not, you have to create it as user root
sudo mkdir /var/www/html/weewx

Did you give permission to Apache to read your new html directory ?
try:
sudo chmod -R 755 /var/www/html/weewx

then you should be able to read the content of the /var/www/html/weewx directory via a browser:
http://your-ip/weewx

If you are logged in as user root (usually the # prompt), you don't need the "sudo"

P.S. "-->" means: look by entering the command

It must have been the permissions because everything else was the same, but now it is working!

Now I just need to figure out how to forward my main webserver to this webserver.

Thanks!
Ecowitt GW1000 | WS-2902C |Weewx on Raspberry Pi
WU: KNMLOVIN14  |  PWSweather: PWSLOVNM1
CWOP: FW9112; https://lovingtonweather.com