Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

502 Bab Getway (nginx)

Aziz Ushurbakiyev August 28, 2019

Friends, help set up JIRA through nginx.

I configured everything according to the instructions, but still gives a 502 error

2 answers

2 accepted

0 votes
Answer accepted
Aziz Ushurbakiyev August 28, 2019

Issue was due to SELinux.

Solution:

setsebool -P httpd_can_network_connect 1
DPKJ
Community Champion
August 28, 2019

Nice catch @Aziz Ushurbakiyev 

0 votes
Answer accepted
DPKJ
Community Champion
August 28, 2019

Two things,

  1. Have you tried accessing Jira directly on port number it is running?
  2. Have you set timeout for Nginx?

Also, please check your Jira and Nginx log files. It will give you some more information.

Aziz Ushurbakiyev August 28, 2019

1) Yes. This's my nginx conf:

server {
listen 80;
server_name kzlapjiraprod02;
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log;

location / {
client_max_body_size 100m;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8080;
}
}

2) No. How can I do it?

DPKJ
Community Champion
August 28, 2019

On point number two you can value of 'keepalive_timeout'

Apart from this check '/var/log/nginx/error.log' file, similar configuration works fine on my instance.

Like Aziz Ushurbakiyev likes this
Aziz Ushurbakiyev August 28, 2019

Thank you!

I checked for errors in logs and issue was in "Permission denied".

setsebool -P httpd_can_network_connect 1

This command helped me to solved my issue 

Suggest an answer

Log in or Sign up to answer