Question

nginx default page

i open server through ip not has domain yet! when i open ip in browser i get nginx default page before i install it. after install nginx still get default page . i remove default file from site available and still show nginx welcome


Submit an answer


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.

Bobby Iliev
Site Moderator
Site Moderator badge
June 26, 2024

Hi there,

After removing the default Nginx server block, did you restart the Nginx service?

sudo systemctl reload nginx

Every time you make a change to the Nginx configuration, you would need to restart the Nginx service.

It is a good practice you first do a config test with nginx -t and only if you get Syntax OK then proceed with the restart.

Let me know how it goes.

- Bobby

alexdo
Site Moderator
Site Moderator badge
June 27, 2024

Heya, @husseinahmed

You can test your Nginx configuration for syntax errors:

sudo nginx -t

The next step will be to reload Nginx to apply the changes:

sudo systemctl reload nginx

Also, ensure your firewall allows HTTP traffic. For example, if you are using UFW, run:

sudo ufw allow 'Nginx Full

Now you should see the content of your custom index.html file instead of the Nginx default welcome page.

Regards

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

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

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.