Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Could I mix this Python Flask tutorial to work with Vesta?

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
3 posts • Page 1 of 1
Peter92
Posts: 9
Joined: Thu Jan 18, 2018 9:31 am

Os: Ubuntu 15x
Web: apache
Could I mix this Python Flask tutorial to work with Vesta?
  • Quote

Post by Peter92 » Fri Jan 19, 2018 4:37 pm

I've got my old PHP website up and running, and now I'd like to try get my (WIP) Flask one hosted. I found a tutorial on how to do it (https://www.digitalocean.com/community/ ... ubuntu-vps), but I'd like to ask a couple of questions before I go and mess up my nice clean installation, since I'll have to modify it a bit for Vesta and I barely know what I'm doing haha.

1. Am I going to break anything by enabling mod_wsgi? (step 1)
2. When it says go to /var/www, would the Vesta equivalent be /home/user/web/site.com/public_html? (step 2)
3. FlaskApp.conf looks similar to site.com.apache2.conf, would it potentially use both (.apache2 for Vesta and that one for Flask), or is it likely it'll only use one? (step 4)

I did have a google on using Python with Vesta but there didn't seem to be a whole bunch of information about it.

Edit: In regards to #3, my friend (who knows Linux but not Flask) suggested create a new website in Vesta, upload it, edit .apache2.conf with values from the tutorial's FlaskApp.conf, then enable ssl support to generate the .apache2-le-ssl.conf file. Does that sound ok?
Top

noogen
Posts: 66
Joined: Thu Jan 05, 2017 9:20 pm

Re: Could I mix this Python Flask tutorial to work with Vesta?
  • Quote

Post by noogen » Sat Jan 20, 2018 12:28 am

Yes, your friend suggestion is right. The tutorial is based off apache so you want to use your friends suggestion. Though, there is a slight tweaks to this suggestion.

After you tested your apache config file, you want to make it into a template and put it into the template folder on your system, example: https://github.com/serghey-rodin/vesta/ ... eb/apache2 - you will need both regular and ssl template.

Then pick the template from the UI. Otherwise, everytime vesta try to renew letsencrypt, it will blow away your apache/flask config.
Top

Peter92
Posts: 9
Joined: Thu Jan 18, 2018 9:31 am

Os: Ubuntu 15x
Web: apache
Re: Could I mix this Python Flask tutorial to work with Vesta?
  • Quote

Post by Peter92 » Sat Jan 20, 2018 2:36 am

Thanks for the reply, that doesn't sound so bad :) I also wasn't aware what the templates were for before so that may be helpful to know for things like a custom php.ini for my old site.
Top


Post Reply
  • Print view

3 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password