opengovfoundation / madison-editor

Node-based editor for Madison
Apache License 2.0
5 stars 5 forks source link

Add proxy on dev server #46

Open krusynth opened 9 years ago

krusynth commented 9 years ago

Right now, etherpad and the editor are being served on different ports, so they don't share the session cookie as they should. The fix here is to proxy everything through Apache or Nginx to those services with different sub-subdomains. Here's how my local copy has this setup (Apache):

<VirtualHost *:80>
ProxyPass / http://localhost:8080/ retry=0
ServerName frontend.madison.localhost
</VirtualHost>

<VirtualHost *:80>
ProxyPass /ep/ http://localhost:9001/ retry=0
ProxyPass / http://localhost:1337/
ServerName editor.madison.localhost
</VirtualHost>

<VirtualHost *:80>
ProxyPass / http://localhost:9001/ retry=0
ServerName etherpad.madison.localhost
</VirtualHost>