How to run web2py project on Apache server?

I want to develop my project using web2py . Until then, I am doing it with python cherrypy . and is now switching to web2py. But I would like to use Apache server instead of WSGI and web2py server!

Could you please advise me how to do this?

+3


source to share


3 answers


The scripts folder (web2py / scripts) includes several installation scripts for deploying a web2py environment using apache for:

  • Fedora Linux: setup-web2py-fedora.sh
  • Ubuntu Linux: setup-web2py-ubuntu.sh


If you have a different OS, you can check it for a detailed step to the installation guide.

As Calvin said, deployment recipes: http://web2py.com/books/default/chapter/29/13

+8


source


A very detailed explanation is provided here - http://web2py.com/book/default/chapter/13#Apache-setup - including the apache2 / mod_wsgi config files.



Maybe you can try this first and ask questions when you run into problems?

+1


source


There is a problem with setup-web2py-ubuntu.sh in version 2.9.5 and earlier if you are trying to run it on Ubuntu 14.04.The main culprit is the fact that Ubuntu 14.04 uses Apache 2.4 which does a few things differently from version 2.2 ...

I changed the installation script to work on Ubuntu 14.04. Now only three commands are executed to run web2py on the new server.

wget https://raw.githubusercontent.com/ivandigiusto/web2py-install/master/setup-web2py-ubuntu-14.04.sh
chmod +x setup-web2py-ubuntu-14.04.sh
sudo ./setup-web2py-ubuntu-14.04.sh

      

Please note that if you run this script on a server that already has Apache and websites configured, it will:

  • erase the current default.conf file in / etc / apache 2 / sites-available /
  • remove all links in / etc / apache 2 / sites-enabled /

To get around this, you can manually change the script setting before starting, or just start a new server and try this on it.

0


source







All Articles