Server Name: Ip or domain (Nginx Server Block )

September 19, 2014 8.1k views

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;


What option would you recommend: IP or domain name?


1 Answer

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.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!