Skip to content

Instantly share code, notes, and snippets.

Created September 16, 2015 02:46
Show Gist options
  • Save anonymous/042cb0166e7300ee2f03 to your computer and use it in GitHub Desktop.
Save anonymous/042cb0166e7300ee2f03 to your computer and use it in GitHub Desktop.
sites-available.conf
<VirtualHost *:80>
ServerAdmin example@gmail.com
Header set Access-Control-Allow-Origin "*"
ServerName whereis.example.com
# Proxy settings
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
DocumentRoot /var/www/example/whereis/whereIAm/templates/
Alias / /var/www/example/whereis/whereIAm/templates/mainpage.html
# This is done so that the html will be served apache, while the app handles the api
ProxyPass /currentpos http://127.0.0.1:8001/currentpos
ProxyPassReverse /currentpos http://127.0.0.1:8001/currentpos
ProxyPass /update http://127.0.0.1:8001/update
ProxyPassReverse /update http://127.0.0.1:8001/update
ProxyPass /allpos http://127.0.0.1:8001/allpos
ProxyPassReverse /allpos http://127.0.0.1:8001/allpos
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment