Learn how to configure ngnix that my settings wrong?

I decided to take a VPS I want to ngnix, when you come to domain it-anthill.ru gave a static page index.html but realized it is not so simple.
Can't configure the server , here is my file ngnix.conf
user www-data;

worker_processes auto;
events {
 use epoll;
 worker_connections 1024;
 multi_accept on;
http {
 include /etc/nginx/mime.types;
 default_type application/octet-stream;

 access_log /var/log/nginx/access.log;
 error_log /var/log/nginx/error.log crit;

 keepalive_timeout 30;
 keepalive_requests 100;

 client_max_body_size 1m;
 client_body_timeout 10;
 reset_timedout_connection on;
 timeout 2;
 sendfile on;
 tcp_nodelay on;
 tcp_nopush on;

 gzip on;
 "gzip_disable" "msie6";
 gzip_proxied any;
 gzip_min_length 1024;
 gzip_comp_level 4;
 gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+r$

 open_file_cache max=200000 inactive=20s;
 open_file_cache_valid 30s;
 open_file_cache_min_uses 2;
 open_file_cache_errors on;

 include /etc/nginx/sites-enabled/*;

then I created a folder with a file etc/nginx/sites-available/it-anthill.EN.conf
this content
server {

 listen 80;
 charset utf-8;

 root /var/www/itant;
 server_name it-anthill.ru;
 access_log /var/log/nginx/it_anthill_access.log;
 error_log /var/log/nginx/it_anthill_error.log;

 location / {
 index index.php index.html;

 location ~ /\.ht {
 deny all;

server {

 listen 80;

 server_name www.it-anthill.ru;
 rewrite ^(.*) http://it-anthill.ru$1 permanent;

then made a symlink to a folder etc/nginx/sites-enabled/@it-anthill.ru.conf
then made a simple html along the way var/www/itant/index.html
in General and in the end nothing works and in the logs also nothing at present((
June 14th 19 at 18:16
2 answers
June 14th 19 at 18:18
You have not directed your domain, even the browser says about it.
Your comment shows that you pointed all subdomains to your server except the primary domain. To fix, second entry, And change www to @ and wait, it will not instantly change.
June 14th 19 at 18:20
to know what to complain about nginx, run the following command before you restart:
sudo nginx -t
he rugnetsya on those lines in those files that he doesn't like

etc/nginx/sites-is availeble/it-anthill.EN.conf

the directory named error — need sites-available

Then just create a folder sites-enabled
Select symbolic. link:
sudo ln-s /etc/nginx/sites-available/it-anthill.EN.conf /etc/nginx/sites-enabled/

and restart nginx:
sudo service nginx restart (but first sudo nginx -tto see, not to offend the server, if offended — correct reason)

in General and in the end nothing works and in the logs also nothing at present((

To view work server:
sudo service nginx status

Also: maybe even DNS is not updated, domain seregely just can servers changed?
so you domain is not sent)) instead
in the fourth line of the show
@ - keara_Mosciski commented on June 14th 19 at 18:26
but I checked the link, too, like correctly registered:

the command sudo nginx -t gives:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

command sudo service nginx status gives:

iz@vds-291:/etc/nginx$ sudo service nginx status
● nginx.service - A high performance web server and a reverse proxy server
 Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
 Active: active (running) since Sun 2017-10-08 03:14:26 EDT; 1min 21s ago
 Process: 9029 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exi
 Process: 11677 ExecReload=/usr/sbin/nginx -g daemon on; master_process on; -s reload (code=exited, status=0/SUC
 Process: 9060 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
 Process: 9057 ExecStartPre=/usr/sbin/nginx -t-q -g daemon on; master_process on; (code=exited, status=0/SUCCESS
 Main PID: 9061 (nginx)
 CGroup: /system.slice/nginx.service
 ├─9061 nginx: master process /usr/sbin/nginx -g daemon on; master_process on
 └─9062 nginx: worker process 

Oct 08 03:14:26 vds systemd[1]: Starting A high performance web server and a reverse proxy server...
Oct 08 03:14:26 vds systemd[1]: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument
Oct 08 03:14:26 vds systemd[1]: Started A high performance web server and a reverse proxy server.

I think I may be the redirection did wrong with reg.ru:

59d9d1711f183520976764.png - yolanda.Ledn commented on June 14th 19 at 18:23

Find more questions by tags NginxSystem administration