User Tools

Site Tools


web2py_on_dreamhost

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
web2py_on_dreamhost [2017/01/16 08:34] jtkorbweb2py_on_dreamhost [2018/04/22 14:53] – typo jtkorb
Line 1: Line 1:
 ====== Installing Web2Py on DreamHost ====== ====== Installing Web2Py on DreamHost ======
 +
 +<WRAP important>\\ **Under construction!**</WRAP>
  
   * For starters, see the README file at https://github.com/web2py/web2py.   * For starters, see the README file at https://github.com/web2py/web2py.
Line 11: Line 13:
   $ virtualenv python   $ virtualenv python
  
-  * 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://github.com/web2py/web2py.git web2py.bikmort.com   $ git clone --recursive https://github.com/web2py/web2py.git web2py.bikmort.com
Line 44: Line 46:
   * An empty WDW application at https://bitbucket.org/jtkorb/wdw.   * An empty WDW application at https://bitbucket.org/jtkorb/wdw.
   * 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/wdw.+  * Current model is to develop on laptop, test locally, commit changes, ssh to DreamHost server, and pull changes to applications/wdw directory.
  
 ===== Sending Email from Web2Py Using Google G Suite ===== ===== Sending Email from Web2Py Using Google G Suite =====
Line 53: Line 55:
   * 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 ''admin'' as well as the app-specific panels at ''MYAPP/appadmin''.
 +
 +  * Enable https from the DreamHost [[https://panel.dreamhost.com/index.cgi?tree=domain.manage|domain management panel]].
 +  * The free certificate from "Let's Encrypt SSL" works.
 +  * Wait for a few minutes for the certificate to get created and installed.
 +  * Restart the web server by touching tmp/restart.txt.
 +  * Set an admin password.
 +
 +  $ python web2py.py -p 443 -a "secret-secure-password"
 +
 +This command will give errors (for among other reasons, a user process cannot listen on port 443), but it will have generated the necessary ''parameters_443.py'' file.
 +  
 +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://help.dreamhost.com/hc/en-us/articles/215747758-How-do-I-force-my-site-to-load-securely-with-an-htaccess-file-|here]].
 +  - 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://www.mysite.com/myapp to https://www.mysite.com/public/myapp.  Verify by opening an incognito window; fix by clearing cached files in the browser.
web2py_on_dreamhost.txt · Last modified: 2019/05/10 07:09 by jtkorb