Report this

What is the reason for this report?

Trying to set up a server block on nginx but I don't want to use a domain, I want to use a ipaddress

Posted on August 27, 2019

I want a server blocks for my mobile app which means that i don’t need a domain. I would like to use my ipaddress instead. Does anyone know how to do this



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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Thank you so much for this response. I however, intend to also host a site on it in the future. Hope I won’t have a problem then?

Hello,

If you are going to host only one application then you could just use the default Nginx config file and add your rules there. The location should be at: /etc/nginx/sites-enabled/.

That way when you access your droplet’s IP address you would be seeing the content specified by the rules of this default config.

Hope that this helps. Regards, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.