Question

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 August 27, 2019 404 views
NginxUbuntu 18.04

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

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.

×
2 answers

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

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?

Submit an Answer