Running Ansible Tower behind nginx

0 votes

To run ansible tower behind nginx, I need to provide headers in remote_host_headers.py file according to the documentation. But I cannot find this file.

Feb 1 in Ansible by Jeena
15 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey @Jeena, you should find it at /etc/tower/conf.d/remote_host_headers.py, It looks like this for me

# HTTP headers and meta keys to search to determine remote host name or IP. Add
# additional items to this list, such as "HTTP_X_FORWARDED_FOR", if behind a
# reverse proxy.
# Note: The headers will be searched in order and the first found remote host
# name or IP will be used.
#
# In the below example 8.8.8.7 would be the chosen IP address.
# X-Forwarded-For: 8.8.8.7, 192.168.2.1, 127.0.0.1
# Host: 127.0.0.1
# REMOTE_HOST_HEADERS = ['HTTP_X_FORWARDED_FOR', 'REMOTE_ADDR', 'REMOTE_HOST']

# This setting is now configured via the Tower API.
# REMOTE_HOST_HEADERS = ['REMOTE_ADDR', 'REMOTE_HOST']

REMOTE_HOST_HEADERS = ['HTTP_X_FORWARDED_FOR', 'REMOTE_ADDR', 'REMOTE_HOST']
answered Feb 1 by Anisha

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer

Running ansible command on a single server when it is deployed to multiple servers

You can try the run_once attribute: Example from ...READ MORE

answered Jun 13, 2018 in Ansible by DareDev
• 6,520 points
76 views
0 votes
1 answer

Permission denied when running ansible playbook through jenkins

Jenkins uses it's own user to execute ...READ MORE

answered Jun 25, 2018 in Ansible by DareDev
• 6,520 points
465 views
0 votes
1 answer

Deploy nginx using Ansible

Follow these steps: Use the following command in ...READ MORE

answered Jan 8 in Ansible by Barbara
21 views
+13 votes
2 answers
0 votes
1 answer
0 votes
3 answers

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.