NOTICE: This forum has been archived (i.e. registration and posting is disabled).
Please go to the new forum at https://forum.kylegabriel.com
Supporting a website in addition to Mycodo
Still super-impressed with your software. My remote sensor is not getting enough sun to keep it's battery charged, but that is not your problem, and I can trace when it happens easily since shifting to Mycodo. http://iotdata.nz
Question - Before creating the Mycodo server and routing iotdata.nz traffic to it, I had a very simple website using that IP.
Can I create a page that will work in this way?
The Mycodo nginx config file is located at Mycodo/install/mycodoflask_nginx.conf, which is copied to /etc/nginx/sites-enabled/default during install and upgrade. After install, you can modify this to suit your needs. Keep in mind that you will need to make the same changes (or restore a backup) after a Mycodo upgrade, as the upgrade script reinstalls this conf file.
My understanding is that /etc/nginx/sites-enabled/default doesn't contain a document root directive, and nginx is compiled with --prefix=/usr/share/nginx
That folder contains only the default index.html file
pi@Mycodo:/etc/nginx $ sudo ls -l /usr/share/nginx/html/ total 4 -rw-r--r-- 1 root root 612 Dec 5 2018 index.html
I have created a very simple HTML file test.html which I have tried putting in:
.. then tried to access this file as:
Can you identify what I'm doing wrong please?
Mycodo uses sockets for connecting to gunicorn to serve Mycodo's frontend. This is all I'm familiar with in regard to nginx. Any other configuration outside this I can't really help with.