-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web UI not working when running AWX behind reverse proxy on a subdomain #631
Comments
I use awx with reverse proxy and I haven't experienced the problem you have, all assets loads (images etc, no 404 errors) My config:
Offtopic but notice the Upgrade and Connection headers. You will need these for websocket to work. I use the image versions: 1.0.1.203 awx-manage print_settings:
(but I don't see these addresses from the browser!) In fact I use cloudflare CDN in addition to my reverse proxy (so it is 2 reverse proxy before awx_web) |
I also can't reproduce this on a basic reverse proxy configuration. |
Sorry, looks like I got subdomain and subpath mixed up. When using a separate domain and running awx from it's root (like awx.mydomain.com/), everything works fine. But when I try to run it on a subpath, the static assets break (base URL is mydomain.com/awx/). Could you please try to reproduce that? |
I'd be skeptical that would work without some more modifications to our internal routing/web server configuration. |
Reproduced the same issue by setting up AWX behind reverse proxy in IIS and can confirm UI is broken |
Same issue here.
|
how should i do this using apache? |
Same here running it on / works perfectly but on /awx the ui is broken :( |
The problem in both cases is that your proxy_pass have no |
Hi same problem with sub-domain # locations.conf
...
location /awx/ {
proxy_pass http://awx/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
} # upstream.conf
...
upstream awx {
server 192.168.50.21;
} Good if you have any workarround |
Hello, anybody can help ? for information when I go to the login page, all statics are down : thanks |
Encountered the same issue. Subdomain with nginx reverse proxy, awx in docker proxied by nginx, user/password does not work when trying to login. |
I adapted this for my Apache reverse proxy based on https://stackoverflow.com/a/34371105
|
+1 here |
This is because AWX has NPM building the index.html domain. AWX declares its static inside public/static/, this is why the generated To support other values for STATIC_URL, AWX should use django-webpack/django-webpack-loader. Basically this will change:
Then AWX will be able to respect STATIC_URL whenever linking to webpack assets. @matburt I think the bug is clearly identified and that this issue may be reopened. Please let me know if you have any question... The problem is that this block the |
ISSUE TYPE
COMPONENT NAME
SUMMARY
When running AWX behind a reverse proxy on a subdomain, the UI is broken due to wrong URL in links to static assets. The API is working okay.
ENVIRONMENT
STEPS TO REPRODUCE
Set up a reverse proxy in front of awx using a subdomain, example settings for nginx:
Settings in AWX:
Base URL:
https://random-server.org/awx
Remote host headers:
HTTP_X_FORWARDED_FOR, REMOTE_ADDR, REMOTE_HOST
EXPECTED RESULTS
The web UI should be working when run from a subdomain
ACTUAL RESULTS
The web UI loads only partially, see attached screenshot
It looks like none of the URLs for static assets respect the subdomain part of the URL, for example:
After running
awx-manage print_settings
in the web container:ADDITIONAL INFORMATION
Screenshot of the broken UI:
The text was updated successfully, but these errors were encountered: