Cant restart Nginx!
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;
fastcgiparam SCRIPTFILENAME $documentroot$fastcgiscript_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.
1 Reply
@zaqir:
location ~ .php$ {
root /usr/share/nginx/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgiparam SCRIPTFILENAME $documentroot$fastcgiscript_name;
include fastcgi_params;
}
You commented the closing brace for the last PHP section.