Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Cant restart Nginx!
PostPosted: Tue Nov 10, 2015 7:34 pm 
Offline

Joined: Tue Nov 10, 2015 7:29 pm
Posts: 1
Hi, I am setting up nginx on my Linode, when I try to restart nginx its returning "nginx: [emerg] unexpected end of file, expecting "}" in etc/nginx/conf.d/default.conf:57"

I have installed dos2unix to convert the file and fix the issue but dos2unix failed to convert the file. Its showing another error "dos2unix: problems converting file default.conf"

Have tried finding the exact issue with "nginx -t -c /etc/nginx/nginx.conf" and removed the two extra spaces after line #54, still not working!

Some input would be great for me.

Here is my default.conf file;

#
# The default server
#
server {
listen 80 default_server;
server_name 103.3.63.200;

#charset koi8-r;

#access_log logs/host.access.log main;

# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;

location / {
root /usr/share/nginx/html;
index index.php index.html index.htm;
}

error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
# root /usr/share/nginx/html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# include fastcgi_params;
#}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}


Any help will be appreciated. Thanks in advance.


Top
   
 Post subject: Re: Cant restart Nginx!
PostPosted: Tue Nov 10, 2015 8:02 pm 
Offline
Senior Newbie

Joined: Tue Jun 07, 2011 5:25 pm
Posts: 14
zaqir wrote:
location ~ \.php$ {
# root /usr/share/nginx/html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# include fastcgi_params;
#}


You commented the closing brace for the last PHP section.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group