0

I have an ec2 instance. Since it was started I was able to access the instance through the public DNS (in the browser) just fine. I initially set the instance up as I needed to host a php script that one of my applications connected with.

Recently, I hosted another app on the box but wanted the app (node app listening on port 8080) to be accessible through a domain I purchased and so I associated my instance with an elastic IP and then connected it to my domain. I then used nginx to forward requests to port 8080 which my app was listening on. Everything works great.

Now, the issue is that I can no longer access my php script through the original URL (publicdns/somefolder/file.php). My initial thought was that this was to be expected and so I tried elasticip/somefolder/file.php. Still no luck. How can I access this script in the browser?

1

You should have differet vhosts/server blocks for each hostname. You should serve example.com on port 80 as normal and only reverse proxy to port 8080 for otherdomain.example.com.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.