O
O
Oleg Gamega2016-04-16 23:18:26
Nginx
Oleg Gamega, 2016-04-16 23:18:26

nginx configuration error?

Hello.
Haven't dealt with Nginx before (I'm not familiar with server administration at all)
my config file

server{
    listen 80  default_server;
    listen [::]:80 default_server ipv6only=on;

    root /home/gadfil/www/cinema;

    index index.php index.html index.htm;

    server_name  my_ip;


    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

     location ~ \.php$ {
        try_files $uri /index.php =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

I run
nginx -t
I get an error
nginx: [emerg] unexpected "}" in /etc/nginx/sites-enabled/cinema.save:5
nginx: configuration file /etc/nginx/nginx.conf test failed

either the skis don’t go or I’m very “smart”, but all quotes are closed
thanks

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
alegzz, 2016-04-17
@gadfi

most likely, when editing the /etc/nginx/sites-enabled/cinema file, the nano editor closed incorrectly. you need to delete the file /etc/nginx/sites-enabled/cinema.save if you didn't create it yourself

P
Pavel Selivanov, 2016-04-17
@selivanov_pavel

Error in /etc/nginx/sites-enabled/cinema.save , you need to look at it

E
Ergil Osin, 2016-04-17
@Ernillew

You are showing us the wrong file, most likely. This one is correct, according to nginx, just checked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question