Google Apps proxy
Next, open /etc/apache2/extra/httpd-vhosts.conf and insert something like the following. Fellow KA devs shouldn’t have to edit much, but if you’re working on a different app you will obviously have to change the static directories. Look in app.yaml to see the full list of statically served paths./etc/apache2/extra/httpd-vhosts.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
Finally, map the ServerName you picked to localhost by editing your /etc/hosts file. See line 12 below./etc/hosts
1 2 3 4 5 6 7 8 9 10 11 12
## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost # Easy access to app engine dev server 127.0.0.1 khanacademy.local
This allows you to access your dev server via something other than localhost, which is needed for the virtual host to work. If you don’t already have -address=0.0.0.0 as a parameter to dev_appserver.py you will need to add this.
Also, Apache needs to be enabled - the easiest way to do this is to go to Sharing under System Preferences and check the “Web Sharing” item. If you already have it enabled, you may need to clear and check it again to force a restart. If it doesn’t start, check your config syntax with apachectl -St.