Hardware: Old laptop YunoHost version: 4.0.8
**I have access to my server : Physical access to machine, ssh, and web ui Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
Now I’m kind of stuck. I suppose I could fork some existing flask app and just replace the actual Python with my own but I’m not really sure how I’d do that or what project would be a good, simple one to fork.
If anyone could point me in the right direction, I’d appreciate it!
Well, I didn’t get very far. There seems to be some kind of problem setting up nginx or php-fpm. I’ve tried installing both my_webapp_ynh and multi_webapp_ynh.
Both installs fail with an error like this:
cp: cannot create regular file ‘/etc/nginx/conf.d/maindomain.tld.d/webapp_maindomain.tld_.conf’: No such file or directory
Worked! my_webapp_ynh is installed.
(Just create the directory. Why didn’t I think of that. )
Hopefully I’ll get my virtual environment and stuff set up tomorrow.
Thank you so much for your help. I’ll let you know if I run into any more problems.
Thanks again!
It’s still not super-clean and everything but at least it installs (also had some weird stuff about ssowat conf but maybe it was just a typo on my side)
Okay, I think I have everything up and running, however I’m running into a strange problem. my_webapp is running on maindomain.tld/flask. When I visit that route, it sends me a 302 redirect to maindomain.tld/yunohost/admin. What could be causing this?
Ideally, I’d like my_webapp to run on maindomain.tld/ and have the portal and admin page somewhere else. Is there a way to move the user interface and admin interface to say yunohost.maindomain.tld/ and prevent my_webapp from redirecting me?
No need to do this, you can define the app as the “default app” in the webadmin > Apps > my_webapp > find the default app button
Not sure but can you :
confirm you did not tweak the nginx conf manually ?
did you tweak the ssowat conf manually ?
otherwise let’s open the network tab in your browser (F12 → network, on firefox) and then try-again to go to the url and let’s see what happens exactly, wether you’re directly redirected to /yunohost/admin or if there are some intermediates urls
I did tweak /etc/nginx/conf.d/domain_where_custom_web_app_installed.tld.d/my_webapp.conf like you mentioned on your “Django on Custom Webapp” post. I haven’t touched /etc/nginx/nginx.conf or anything like that.
Although, now that I look closer, I can’t see any of my changes in /etc/nginx/conf.d/domain_where_custom_web_app_installed.tld.d/my_webapp.conf anymore. I wonder if the webmin overwrote something…
When I visit the url, there is a 302 redirect to /yunohost/admin, then a 301 to /yunhost/admin/ which responds with 200, and starts loading stylesheets, javascript, etc.