Hi and hello. This is my first post. To summarize, I retired from 44 years as a C and dinosaur-language programmer in April of '20. My wife was using Excel to categorize our collection of LPs, CDs and DVDs. Hey, why not make a web app with a RESTful back-end (Flask) and modern (Svelte) front-end for her? Done. Had to learn Flask and Python and JavaScript and Svelte (although I did a little Angular on my last project). Everything worked in the development server, my WIN10 PC. Oh, and MySQL as the database. No comments about any of my choices would be appreciated. So, I stood up an Ubuntu 20.x PC for my Plex server and installed Apache, and all things Flask and MySQL. Running the Flask app from a terminal session on port 5000 works fine. Changed it to a different port and it still works. My wife can add/edit/display the media records in the database. As long as the Linux box doesn't go to sleep. When it does, it stops listening (duh). I put a SSD in it so I don't feel bad leaving it running. However ... I'd like Apache to host the web service, not the development server. SO, I followed all the instruction for installing WSGI and the sample HelloWorld.py file ran fine from any PC. Since that worked, I thought I'd follow the same steps and install the Flask app. <maniacal laughter> Nope. Crickets. 192.168.1.x/test_wsgi works fine. 192.168.1.x:8090/media/?id=5 (for example) gives me 'Refused to connect' or something less than optimal.
Perused through all the 'Installing Flask app' articles posted on Google. Changed .conf files, <VirtualHost> entries, ya-da-ya-da... Crickets.
My next step, when I calm down about all the wasted mornings spent trying to get it to work, will be to undo all the mods and try again (even though I've done that a few times already). Oh, I forgot to mention that initially this DID work! But I made a change to the .py file and deployed it back to Linux. Bang. Crickets.
Is there a definitive guide *somewhere* about installing Flask (or any Python file) on Linux? I know I have the sample running fine, but there are no log entries with errors when I try to run my app. It's as though Apache is port-deaf to my :8090. Why did I choose that port? No reason. Port 80 serves up the Svelte app.
So for the foreseeable future, I'm leaving the Linux box running and the REST api is being served by a terminal session running the development server on port :8090.
Perused through all the 'Installing Flask app' articles posted on Google. Changed .conf files, <VirtualHost> entries, ya-da-ya-da... Crickets.
My next step, when I calm down about all the wasted mornings spent trying to get it to work, will be to undo all the mods and try again (even though I've done that a few times already). Oh, I forgot to mention that initially this DID work! But I made a change to the .py file and deployed it back to Linux. Bang. Crickets.
Is there a definitive guide *somewhere* about installing Flask (or any Python file) on Linux? I know I have the sample running fine, but there are no log entries with errors when I try to run my app. It's as though Apache is port-deaf to my :8090. Why did I choose that port? No reason. Port 80 serves up the Svelte app.
So for the foreseeable future, I'm leaving the Linux box running and the REST api is being served by a terminal session running the development server on port :8090.