Learn to configure the server manually on VPS. Installed nginx + php5-fpm. I do not understand why it is necessary to specify 127.0.0.1, not the address of my server. Although put the address, nothing came of it.
But unable to configure it correctly. Here is the server nginx running, but 502 error -
176.112.212.179/index.phpserver {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/htdocs;
index index.php;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
# fastcgi_split_path_info ^(.+\.php)(.*)$;
location 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param DOCUMENT_ROOT /htdocs;
fastcgi_param SCRIPT_FILENAME /htdocs$fastcgi_script_name;
fastcgi_param PATH_TRANSLATED /htdocs$fastcgi_script_name;
include fastcgi_params;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
set by the fastcgi_buffer_size 128k;
fastcgi_buffers directives 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
location ~* ^.+.(js|css|png|jpg|jpeg|gif|ico)$ {
access_log off;
expires max;
}
location ~ /\.ht {
deny all;
}
}
What's the problem?
If nginx is installed on the same vds, and php-fpm on the other - no. - Daphne_Roob commented on July 8th 19 at 11:24