Question

Question on Nginx set-up.

I’m trying to set up Nginx on my server. In the initial set up I have to do ip -4 addr show scope global

So I do that and I get:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 inet 157.245.5.153/20 brd 157.245.15.255 scope global eth0 valid_lft forever preferred_lft forever inet 10.17.0.5/16 brd 10.17.255.255 scope global eth0 valid_lft forever preferred_lft forever 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 inet 10.108.0.2/20 brd 10.108.15.255 scope global eth1 valid_lft forever preferred_lft forever

for eth0: which IP address do I need to use?


Submit an answer
Answer a question...

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!

Sign In or Sign Up to Answer

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.

KFSys
Site Moderator
Site Moderator badge
July 2, 2022

Hi @b3699d04c0e6-4b4f-afaf-3bd295,

You can see the IP address in the eth0 line. As has already been mentioned it’s 157.245.5.153, the /20 part is what range this IP is from. Usually, you should be able to see the Droplet’s IP with

hostname -i

command as well.

Bobby Iliev
Site Moderator
Site Moderator badge
July 1, 2022

Hi there,

Based on the output that you’ve shared, the following should be the public IPv4 address of your Droplet:

157.245.5.153

Hope that this helps!

Best,

Bobby

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.