Skip to content
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

Unable to load web page (HTML, Javascript, CSS not working) #58

Closed
mohitpujara opened this issue Jul 8, 2015 · 10 comments
Closed

Unable to load web page (HTML, Javascript, CSS not working) #58

mohitpujara opened this issue Jul 8, 2015 · 10 comments

Comments

@mohitpujara
Copy link

Hi,

I'm using NGINX proxy as a docker container but its not loading web page properly...

53d9ea1c-2565-11e5-8f88-042b666fdacc

Anyone getting like this?

@mohitpujara mohitpujara changed the title Unable to load web page (HTMl, Javascript, CSS not working) Unable to load web page (HTML, Javascript, CSS not working) Jul 8, 2015
@ghost
Copy link

ghost commented Jul 16, 2015

me too... +1 seems linked to the change in HTML5 links ...?

@mohitpujara
Copy link
Author

I think its a problem with regex rule on nginx configuration file. i'm unable to find the proper regex rule which will load all the front end stuff.. Temporary i'm writing separate rules for all the front end folder like styles, scripts .... etc

@kwk
Copy link
Owner

kwk commented Jul 16, 2015

Does it work without NGINX?

@mohitpujara
Copy link
Author

yep.. without NGINX its working..

@kwk
Copy link
Owner

kwk commented Jul 23, 2015

@mohitpujara I cannot help without knowing the nginx configuration.

@mohitpujara
Copy link
Author

@kwk This is my nginx configuration...

upstream docker-backend {
server backend:5000;
}

upstream docker-frontend {
server frontend:80;
}

server { 
  server_name $host;

  listen 443 ssl; 
  ssl_certificate /etc/nginx/ssl/server.crt; 
  ssl_certificate_key /etc/nginx/ssl/server.key;
  ssl_ciphers 'AES256+EECDH:AES256+EDH::!EECDH+aRSA+RC4:!RC4:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS';
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  ssl_session_cache shared:SSL:10m;
  ssl_stapling on;
  ssl_stapling_verify on;
  ssl_prefer_server_ciphers on;
  add_header Strict-Transport-Security max-age=31536000;
  add_header X-Frame-Options DENY;

  client_max_body_size 0; 

  proxy_set_header Host $host; 
  proxy_set_header X-Real-IP $remote_addr; 
  proxy_set_header Authorization "";

  location / { 
    auth_basic "Docker Registry"; 
    auth_basic_user_file /etc/nginx/auth/registry_passwd; 
    proxy_pass http://docker-backend; 
  }

  location ~ ^/ui(/?)(.*)$ { 
    auth_basic "Docker Registry"; 
    auth_basic_user_file /etc/nginx/auth/registry_passwd; 
    proxy_pass http://docker-frontend/$2$is_args$args; 
  }

  location /v1/_ping { 
    proxy_pass http://docker-backend; 
  }

  location /v1/users { 
    proxy_pass http://docker-backend; 
  }
}

@kwk
Copy link
Owner

kwk commented Jul 23, 2015

This might be related to your /ui/ prefix. Please try to run your frontend without any prefix and reopen this issue if necessary. There's also #50 that deals with this problem. Anyway, please let us know if removing the /ui/ prefix works.

@kwk kwk closed this as completed Jul 23, 2015
@mohitpujara
Copy link
Author

if i'm not giving any prefix then it will redirect to docker-registry which is root and i want docker-registry to be root otherwise i'm unable to pull and push to the registry. There is already a regex rule for /ui/ but its not working.

@kwk
Copy link
Owner

kwk commented Jul 23, 2015

Understood. What if you host the registry and frontend on different domains/vhosts?

@mohitpujara
Copy link
Author

I'm sorry but its not possible for me.. I have to run all stuff in one domain. I think its just a regex rule problem. i'm not getting the proper regex expression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants