Skip to content

Windows Server Setup

jeremyhewett edited this page Oct 28, 2014 · 42 revisions

For this guide, the install directory is assumed to be C:\www\redwood\

1. Install Python

2. Install Apache

3. Install mod_wsgi

4. Install GoLang

5. Install Redis

6. Install Python-redis interface

7. Copy Source

  • Navigate to https://github.com/RedwoodAdmin/RedwoodFramework?source=c and click Download ZIP.
  • Extract the contents of the zip to C:\www\redwood\
  • Create empty file log.txt in C:\www\redwood\
  • Open C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf, and change the DocumentRoot path to C:/www (Also replace the path further down in the file where it says This should be changed to whatever you set DocumentRoot to.)

8. Apache Config

  • Copy the folder C:\www\redwood\install\windows\apache to C:\www\redwood\ (Contains 2 files: config.json and django.wsgi)
  • Update the paths in both files if installing to a directory other than C:\www\redwood\

9. Install Router

  • Create system environment variable: GOPATH=C:\www\redwood\go\
  • In command prompt navigate to C:\www\redwood\go\src\expecon-router and run >go install
  • Create shortcut to C:\www\redwood\go\bin\expecon-router.exe in C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

10.Apache Virtual Host

  • Overwrite contents of C:\Program Files\Apache Software Foundation\Apache2.2\conf\extra\httpd-vhosts.conf With:
<VirtualHost *:80>
  ServerName redwood.example.com
  ServerAdmin admin@example.com
  WSGIScriptAlias / C:/www/redwood/apache/django.wsgi
  Alias /static C:/www/redwood/static
</VirtualHost>
  • In C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf, uncomment the line: Include conf/extra/httpd-vhosts.conf

11.Install Django

12.Initialize

  • Restart Apache
  • Start Redis service (service manager)
  • Run C:\www\redwood\go\bin\expecon-router.exe and add exception to Windows firewall if prompted.
  • In command prompt navigate to C:\www\redwood\ and run: >manage.py syncdb providing the following inputs when prompted:
    • yes
    • username: admin (or any other username)
    • email: admin@localhost.com (or any other email)
    • password: ubcecon (or any other password)
  • >manage.py collectstatic
    • Yes

13.Run

  • Open Google Chrome and enter localhost/admin in the address bar.
  • Login with the admin credentials provided during initialization.
  • Click Sites -> example.com and set
    • Domain name: localhost
    • Display name: localhost
  • Click save

Troubleshooting

  • Cannot open “localhost/admin” and apache error.log shows something like “no module urls” Solution: Try rebooting
  • Clients can’t connect to server Try turning off windows firewall – if that works then need to create inbound rule to allow tcp connections on port 80.