Hi all,
I want to have 4 applications running behind an apache proxy. My config in apache is:
<VirtualHost *:80>
The ServerName directive sets the request scheme, hostname and port that
the server uses to identify itself. This is used when creating
redirection URLs. In the context of virtual hosts, the ServerName
specifies what hostname must appear in the request’s Host: header to
match this virtual host. For the default virtual host (this file) this
value is not decisive as it is used as a last resort host regardless.
However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
Available loglevels: trace8, …, trace1, debug, info, notice, warn,
error, crit, alert, emerg.
It is also possible to configure the loglevel for particular
modules, e.g.
#LogLevel info ssl:warn
ErrorLog {APACHE_LOG_DIR}/error.log CustomLog {APACHE_LOG_DIR}/access.log combined
For most configuration files from conf-available/, which are
enabled or disabled at a global level, it is possible to
include a line for only one particular virtual host. For example the
following line enables the CGI configuration for this host only
after it has been globally disabled with “a2disconf”.
#Include conf-available/serve-cgi-bin.conf
ProxyRequests Off
<Proxy *>
Order deny,allow
#Deny from all
Allow from all
#Allow from 127.0.0.1
ProxyPreserveHost On
ProxyPass /demo1/ws ws://127.0.0.1:5006/demo1/ws
ProxyPassReverse /demo1/ws ws://127.0.0.1:5006/demo1/ws
ProxyPass /demo2/ws ws://127.0.0.1:5006/demo2/ws
ProxyPassReverse /demo2/ws ws://127.0.0.1:5006/demo2/ws
ProxyPass /demo3/ws ws://127.0.0.1:5006/demo3/ws
ProxyPassReverse /demo3/ws ws://127.0.0.1:5006/demo3/ws
ProxyPass /demo4/ws ws://127.0.0.1:5006/demo4/ws
ProxyPassReverse /demo4/ws ws://127.0.0.1:5006/demo4/ws
ProxyPass /demo1 http://127.0.0.1:5006/demo1
ProxyPassReverse /demo1 http://127.0.0.1:5006/demo1
ProxyPass /demo2 http://127.0.0.1:5006/demo2
ProxyPassReverse /demo2 http://127.0.0.1:5006/demo2
ProxyPass /demo3 http://127.0.0.1:5006/demo3
ProxyPassReverse /demo3 http://127.0.0.1:5006/demo3
ProxyPass /demo4 http://127.0.0.1:5006/demo4
ProxyPassReverse /demo4 http://127.0.0.1:5006/demo4
<Directory />
Require all granted
Options -Indexes
</Directory>
Alias /static /root/.virtualenvs/scipy/lib/python2.7/site-packages/bokeh/server/static/
<Directory /root/.virtualenvs/scipy/lib/python2.7/site-packages/bokeh/server/static/>
# directives to effect the static directory
Options +Indexes
</Directory>
``
It does not draw anything even when it downloads all the css and js without problem, looking at the html code I think the problem is in this line:
Bokeh.embed.embed_items(docs_json, render_items, “ws://myMachine.private/demo1/ws”);
``
since I don’t see that query in the Apache logs.
Moreover, my problem will be bigger, since the final “production version” will be behind will be behind 3 proxies like:
machineA.public has an Apache server that redirects one of the folders to myMachine.private using machineB.public as a proxy (this is a squid proxy).
I tested this configuration, and it seems the path to the css, js and ws created by bokeh are like http://myMachine.private/… instead of the correct http://machineA.public/folder/… or even ./…
Do you have any ideas on how to solve this problems, both the “simple one”, and then the one with the 3 proxies in the middle. I can partially change the configuration of the proxies, and I would not mind if I have to hardcode the host names or similar in the code to make it works.
Thanks.