Girish Ramakrishnan af400a038e Set various proxy headers in nginx config
These headers are required for apps like wordpress to figure the
site url. It is not clear why they do not just use relative urls.

http://cmanios.wordpress.com/2014/04/12/nginx-https-reverse-proxy-to-wordpress-with-apache-http-and-different-port/
2014-08-10 22:31:42 -07:00
2013-10-12 09:56:21 -07:00
2014-08-09 22:39:41 -07:00
2014-07-02 11:38:48 -07:00
2014-08-06 12:51:38 -07:00
2014-08-06 20:34:42 -07:00
2014-08-06 20:34:42 -07:00
2014-08-08 19:01:38 -07:00

The Box

Development setup

  • sudo adduser yellowtent ** This dummy user is required for supervisor 'box' configs

  • rmappdir.sh should be callable without a password ** Add a file called /etc/sudoers.d/yellowtent with the following contents: Defaults!/home/girish/yellowtent/box/src/rmappdir.sh env_keep=HOME girish ALL = (ALL) NOPASSWD: /home/girish/yellowtent/box/src/rmappdir.sh Defaults!/home/girish/yellowtent/box/src/reloadnginx.sh env_keep=HOME girish ALL = (ALL) NOPASSWD: /home/girish/yellowtent/box/src/reloadnginx.sh

    (replace the username and path to rmappdir.sh to match your environment)

    You might have to clear the sudo cache using sudo -k.

** Verify using sudo src/rmappdir.sh --check. This should print 'OK' ** Verify using sudo src/reloadnginx.sh --check. This should print 'OK'

  • Set your hostname to 'mybox.cloudron.us' ** On Mac, settings the hostname through command line resets the name periodically. Using the network control panel, always appends a .local suffix. Workaround: sudo scutil --set HostName mybox.cloudron.us

  • export FQDN='mybox.cloudron.us' (add this to your .bashrc) ** Add the above domain to your /etc/hosts ** All apps will be installed as hypened-subdomains of the above FQDN ** You should add hyphened-subdomains of your apps into /etc/hosts

Running

  • ./run.sh - this starts up nginx to serve up the webadmin ** https://mybox.cloudron.us should now be accessible ** Do not use https://localhost. It will appear to work work but will break oauth redirection

  • DEBUG=box:* ./app.js - this the main box code ** NODE_ENV is set to production by default

Deployment setup

Creating a box image involves the following steps:

S
Description
Cloudron Box
Readme 47 MiB
Languages
JavaScript 72.6%
Vue 22.3%
Shell 3.1%
HTML 1.1%
EJS 0.7%
Other 0.2%