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.

Revisions

  1. @invalid-email-address Anonymous created this gist Sep 16, 2015.
    26 changes: 26 additions & 0 deletions sites-available.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    <VirtualHost *:80>
    ServerAdmin [email protected]

    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>