This is my third attempt at posting this question now after incorrectly posting to both super user and Stack Overflow. Hopefully this is now the right place!
I have taken over managing the company's web hosting, which is an AWS server running Amazons own version of Linux and Nginx.
I don't have much experience of Nginx, but I need to create a subdomain running a development version of the site. There is already an existing "Staging" virtual host, however it is linked to the main sites database making useless.
I have copied the staging conf file from /etc/nginx/conf.d/staging.conf to /etc/nginx/conf.d/dev.conf and changed all instances of "staging" within the file to "dev".
This is what the file looks like:
upstream php-dev-backend {
server unix:/tmp/php-fpm-dev.sock weight=1;
}
server {
server_name dev.groundlevel.co.uk;
listen 80;
root /var/www/vhosts/dev.groundlevel.co.uk/web-root;
index index.html index.htm index.php;
access_log /var/log/nginx/dev.groundlevel.co.uk_access_log;
error_log /var/log/nginx/dev.groundlevel.co.uk_error_log;
location @handler {
rewrite / /index.php;
}
location / {
index index.php index.html;
try_files $uri $uri/ @handler;
expires 30d;
}
include magento_security;
include fastcgi_params;
location ~ \.php$ {
if (!-e $request_filename) {
rewrite / /index.php last;
}
include fastcgi_params;
fastcgi_pass php-dev-backend;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
However this is leading to a 502 error as /tmp/php-fpm-dev.sock doesn't exist and I have no Idea how to create it. Or if I can change the conf file to not need the socket.
Could someone please explain how to get the socket running? Thanks!