# Ansible Tower Unable to open in browser

**URL:** <https://forum.ansible.com/t/ansible-tower-unable-to-open-in-browser/24426>\
**Category:** Ansible Project\
**Tags:** azure, awx\
**Created:** [May 9, 2017, 2:40pm UTC](https://forum.ansible.com/t/ansible-tower-unable-to-open-in-browser/24426 "2017-05-09T14:40:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhinesh](https://avatars.discourse-cdn.com/v4/letter/d/8dc957/32.png) [@Dhinesh](https://forum.ansible.com/u/Dhinesh)\
**Post date:** [May 9, 2017, 2:40pm UTC](https://forum.ansible.com/t/ansible-tower-unable-to-open-in-browser/24426/1 "2017-05-09T14:40:59Z")

</div>

I would really appreciate if any one could kindly help me in this .. I am trying to install Ansible Tower version 3.1.2 in Centos 7.2 . There was no issue in the installation but when I tried to open the Ansible Tower in the browser I am unable to open .. My Centos server is in Azure and I am trying to use the Public IP to connect to the Ansible Tower . Also in the Inbound routing I have opened Port 80 for the server in Azure .

When I try to "curl [http://localhost](http://localhost) " I could find the tower respond but when I try to use the Public IP to connect it throws error as mentioned below

301 Moved Permanently
# 301 Moved Permanently

* * *
nginx/1.10.2

Below are the details of the nginx configuration file .where 52.172.40.132 is my public IP .

worker\_processes auto;

error\_log /var/log/nginx/error.log warn;  
pid /var/run/nginx.pid;

events {  
worker\_connections 1024;  
}

http {  
include /etc/nginx/mime.types;  
default\_type application/octet-stream;

log\_format main '$remote\_addr - $remote\_user [$time\_local] “$request” ’  
'$status $body\_bytes\_sent “$http\_referer” ’  
‘“$http\_user\_agent” “$http\_x\_forwarded\_for”’;

access\_log /var/log/nginx/access.log main;

map $http\_upgrade $connection\_upgrade {  
default upgrade;  
‘’ close;  
}

sendfile on;  
tcp\_nopush on;  
tcp\_nodelay on;

upstream uwsgi {  
server 127.0.0.1:8050;  
}

upstream daphne {  
server 127.0.0.1:8051;  
}

server {  
listen 443 default\_server ssl;  
listen 127.0.0.1:80 default\_server;  
listen [::1]:80 default\_server;  
#listen 52.172.40.132:80 default\_server;

# If you have a domain name, this is where to add it

server\_name \_;  
keepalive\_timeout 65;

ssl\_certificate /etc/tower/tower.cert;  
ssl\_certificate\_key /etc/tower/tower.key;  
ssl\_session\_cache shared:SSL:50m;  
ssl\_session\_timeout 1d;  
ssl\_session\_tickets off;

# intermediate configuration

ssl\_protocols TLSv1.2;  
ssl\_ciphers ‘ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256’;  
ssl\_prefer\_server\_ciphers on;

# HSTS (ngx\_http\_headers\_module is required) (15768000 seconds = 6 months)

add\_header Strict-Transport-Security max-age=15768000;

# Protect against click-jacking [Clickjacking | OWASP Foundation](https://www.owasp.org/index.php/Testing_for_Clickjacking_(OTG-CLIENT-009))

add\_header X-Frame-Options “DENY”;

location /favicon.ico { alias /var/lib/awx/public/static/favicon.ico; }  
location /static { alias /var/lib/awx/public/static; }

location /websocket {

# Pass request to the upstream alias

proxy\_pass [http://52.172.40.132:80](http://52.172.40.132:80);  
#proxy\_pass [http://daphne](http://daphne);

# Require http version 1.1 to allow for upgrade requests

proxy\_http\_version 1.1;

# We want proxy\_buffering off for proxying to websockets.

proxy\_buffering off;

# [X-Forwarded-For - Wikipedia](http://en.wikipedia.org/wiki/X-Forwarded-For)

proxy\_set\_header X-Forwarded-For $proxy\_add\_x\_forwarded\_for;

# enable this if you use HTTPS:

proxy\_set\_header X-Forwarded-Proto https;

# pass the Host: header from the client for the sake of redirects

proxy\_set\_header Host $http\_host;

# We’ve set the Host header, so we don’t need Nginx to muddle

# about with redirects

proxy\_redirect off;

# Depending on the request value, set the Upgrade and

# connection headers

proxy\_set\_header Upgrade $http\_upgrade;  
proxy\_set\_header Connection $connection\_upgrade;  
}

location / {

# Redirect if there is no forward-slash

rewrite ^(.\*[^/])$ $1/ permanent;  
uwsgi\_read\_timeout 120s;  
uwsgi\_pass uwsgi;  
include /etc/nginx/uwsgi\_params;  
}  
}

server {  
listen 80 default\_server;  
listen [::]:80 default\_server;  
server\_name \_;  
return 301 https://$host:443$request\_uri;  
}

}

Thanks,  
Dhinesh
