Welcome! Log In Create A New Profile

Advanced

Problem with aliases

June 30, 2021 07:31PM
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;
}
}
Subject Author Posted

Problem with aliases

yosef June 30, 2021 07:31PM

Re: Problem with aliases

Francis Daly July 01, 2021 01:58AM

Re: Problem with aliases

yosef July 01, 2021 04:37PM

Re: Problem with aliases

Francis Daly July 02, 2021 03:52AM

Re: Problem with aliases

yosef July 03, 2021 05:15PM

Re: Problem with aliases

Francis Daly July 04, 2021 09:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 283
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready