By skoley
Hi,
I am trying have different sub domains resolving to the same IP (same droplet) but with different ports, pointing to single nginx server; which in turn points to apache.
I am trying to set some thing like this .
example.com point to droplet ip with port 80 dev.example.com point to droplet ip with port 8081 info.example.com point to droplet ip with port 8080
and so on.
I have currently set up nginx to listen to port 80 and forward to apache @ port 8080 which works fine.
But I am confused how should go about to do the same for sub domains.
I set up the nginx server soley ofr proxy server as several article point to same, iam not sure this is re right direction I am in.
i did find a similar question https://www.digitalocean.com/community/questions/subdomains-pointing-to-same-droplet-in-different-ports
but the answer here is not exactly what my question is and also very vague for a beginner like me.
Any help in this regard will be highly appreciated.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
long story short
I want dev.mydomain.com to redirect to mydomain.com:8080 and I want to preserve the original sub-domain name the url of the browser.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.