Hello,
Im trying to use several blocks in my server using the server IP as server name (no domain yet), each block points to a folder containing Wordpress. I dont know what Im doing wrong because instead of running index.php nginx is download the file.
Here is my configuration file:
server {
listen 80;
listen [::]:80;
index index.php;
server_name 173.230.131.168;
location ^~ /proj1 {
alias /var/www/proj1/public_html;
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ^~ /proj2 {
alias /var/www/proj2/public_html;
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
}
}