Can you please be more specific with your questions? What do you mean by "apache centos"? What have you tried that resulted in a "502 bad gateway error"?
In order to help you, I need a clear description of what you are trying to achieve, what you have done so far, which result you expected, and what the actual result was.