Report this

What is the reason for this report?

Server Name: Ip or domain (Nginx Server Block )

Posted on September 19, 2014

Hi all! I’m using this tutorial to install my wordpress. All works perfect.

But in step five i’ve a doubt in nginx server block. I don’t know which is the best option in “server name” :

server {
        
        root /var/www/html;
        index index.php index.html index.htm;

        server_name your_domain.com;

What option would you recommend: IP or domain name?

Thanks!



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.

You should use the domain name for that. The main use of the server_name configuration is if you have multiple domains or subdomains hosted at the same IP address. It allows Nginx to direct requests to the right place.

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.