web2py_on_dreamhost
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
web2py_on_dreamhost [2017/01/16 08:16] – created jtkorb | web2py_on_dreamhost [2019/05/10 07:09] (current) – [Installing Web2Py on DreamHost] jtkorb | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Installing Web2Py on DreamHost ====== | ====== Installing Web2Py on DreamHost ====== | ||
+ | |||
+ | <WRAP important> | ||
* For starters, see the README file at https:// | * For starters, see the README file at https:// | ||
- | * Create a fully-hosted domain at [[https:// | + | * Create a fully-hosted domain at [[https:// |
- | * Be sure to enable a shell account to access the DreamHost server. | + | * Site configuration |
* Since DreamHost uses Passenger as its web app server, extra steps are required to get Web2Py working. | * Since DreamHost uses Passenger as its web app server, extra steps are required to get Web2Py working. | ||
- | * Open a terminal window on your DreamHost server. | + | * Use a shell account to open a terminal window on your DreamHost server. |
+ | * Create a virtual python environment in ~/ | ||
- | cd ~ | + | |
- | virtualenv python | + | |
+ | $ source python/ | ||
+ | $ pip install requests | ||
- | * Clone sources from Web2Py github site into web-server directory (using web2py.bikmort.com as an example): | + | * Clone sources from the Web2Py github site((You might prefer to go to github.com and create a fork of the Web2Py sources, then clone your fork. That's what all the cool kids do.)) into web-server directory (using web2py.bikmort.com as an example): |
- | git clone --recursive https:// | + | |
* To update to latest Web2Py later (from within web-server directory): | * To update to latest Web2Py later (from within web-server directory): | ||
- | git pull --recurse-submodules | + | |
- | + | $ git pull --recurse-submodules | |
* Copy handlers/ | * Copy handlers/ | ||
- | cp handlers/ | + | |
- | * Insert these two lines at around line 40 (before call to os.path.isdir): | + | * Insert these two lines at around line 40 in passenger_wsgi.py |
- | INTERP = os.path.join(os.environ[' | + | |
- | if sys.executable != INTERP: os.execl(INTERP, | + | if sys.executable != INTERP: os.execl(INTERP, |
- | * Note that the INTERP path points to the virtualenv-created executable. | + | * Note that the INTERP path points to the virtualenv-created executable |
* Create tmp/ | * Create tmp/ | ||
- | ===== EVE Online Steps ===== | + | The Web2Py |
- | * Additional modules needed by EVE Online | + | |
- | + | ||
- | ~/ | + | |
- | ~/ | + | |
- | ~/ | + | |
===== Notes ===== | ===== Notes ===== | ||
Line 47: | Line 48: | ||
* An empty WDW application at https:// | * An empty WDW application at https:// | ||
* Clone into applications directory and it (should be) ready to go. | * Clone into applications directory and it (should be) ready to go. | ||
- | * Current model is to develop on laptop, test locally, commit changes, ssh to buxton.dreamhost.com, and pull changes to applications/ | + | * Current model is to develop on laptop, test locally, commit changes, ssh to DreamHost server, and pull changes to applications/ |
- | ===== Sending Email from Web2Py ===== | + | ===== Sending Email from Web2Py |
* These steps do not currently (1/8/2017) appear to work reliably (Google-imposed security concerns). | * These steps do not currently (1/8/2017) appear to work reliably (Google-imposed security concerns). | ||
Line 56: | Line 57: | ||
* Use SSL with port 465 | * Use SSL with port 465 | ||
* At Google-app admin site: allow insecure applications and disable captcha. | * At Google-app admin site: allow insecure applications and disable captcha. | ||
+ | |||
+ | ===== Remote Admin Access ===== | ||
+ | |||
+ | These steps allow remote browser access to the Web2Py administrative control panels (both the master panel at '' | ||
+ | |||
+ | * Enable https from the DreamHost [[https:// | ||
+ | * The free certificate from " | ||
+ | * Wait for a few minutes for the certificate to get created and installed. | ||
+ | * Restart the web server by touching tmp/ | ||
+ | * Set an admin password. | ||
+ | |||
+ | $ python web2py.py -p 443 -a " | ||
+ | |||
+ | This command will give errors (for among other reasons, a user process cannot listen on port 443), but it will have generated the necessary '' | ||
+ | | ||
+ | To redirect all accesses to be via https, there are two options: | ||
+ | - Use an .htaccess file to do a redirect as described by DreamHost [[https:// | ||
+ | - Use Web2Py Auth(..., secure=True) setting, but note that this change breaks Travis CI testing. | ||
+ | |||
+ | In either case, there might be cached browser files that break the redirect, for example, redirecting http:// |
web2py_on_dreamhost.1484583400.txt.gz · Last modified: 2017/01/16 08:16 by jtkorb