0

I have a little strange case.

I configured two servers in AWS: Develop and QA, the two with Ubuntu 16.04, Apache 2 and PHP 7.0. I created a website en Develop, and configured its VirtualHost file. So, in Develop I edit its /etc/hosts file to point to itself:

127.0.0.1 site.test.com

And, in QA, I edit its /etc/hosts file to poinut to Develop private ip.

172.x.x.x site.test.com

And, if I test with elinks in Develop and QA, I can acces to the site without problem in both cases.

Now, in my local Windows computer, if I put the Public IP from Develop Server in mi chrome, it shows me the Apache default page. You know, that page with the text "It works! This is the default welcome page used to test the correct operation of the Apache2..."

So, I edited my local hosts files from my computer, pointing my site to Develop Public IP:

x.x.x.x site.test.com

But, when I tried to access site.test.com in my chrome, it thow me a HTTP ERROR 502.

I can acces to Develop server by SSH by its public ip, and I can see the Apache default page, but I can´t see the sites I configured in it. But, internally between the two servers in AWS, I can.

What I am doing wrong? Did I misunderstand something?

  • Would it be a problem if you also posted your virtual host file? It would certainly help identifying the issue. – Zip Oct 10 '17 at 01:21
  • You say that you can access them internally in AWS, is that when using the private ip? Does it work with the public ip internally? – Bazze Oct 11 '17 at 21:03

1 Answers1

0

A 502 error will be logged with more specific information in your apache error log. Perhaps looking at it will provide some relevant information that will help you figure this out.

user9517
  • 115,471
  • 20
  • 215
  • 297