Hi!
I currently have an application running on dropletIP:port/appname. I can’t figure out how to connect it to my domain such that I get appname.domain.com.
Can you please help me out?:)
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!
First thing you need is domain. In your Domain DNS management or DigitalOcean DNS management (if you pointed domains NS to DO and added domain to CP) you need to create CNAME record with name appname pointing to @.
Now you’ll be able to use appname.example.com but you still need to configure server for it. What you can do is to create a reverse proxy. This is done using Apache or Nginx Web server.
I would recommend you to go with Nginx. It’s very easy to set up reverse proxy with it, and it’s lightweight.
First you need to install it - How To Install Nginx on Ubuntu 16.04, will help you to do so.
Then, you need a server block for your subdomain. Follow Server Blocks tutorial to set up server block for appname.example.com.
Now you’re ready for key part - reverse proxy. Nginx docs will help you set up it.
If you got any questions or need help, feel free to ask. =)
So I already had nginx installed through the tutorial I followed to upload my app.
Unfortunately in that tutorial we overwrote the nginx default file (I don’t know why, I still have no idea what I’m doing haha). But now I’m getting into trouble when following along with the Server Blocks tutorial because my nginx default file is not the actual nginx default file anymore…
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.