server{
listen 80;
listen [::]:80;
server_name test.com;
root /var/www/test.com;
index index.html;
location /{
try_files $uri $uri/ =404;
}
#添加php解析
location ~ .php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
}
}
- server{
- listen 80;
- listen [::]:80;
- server_name test.com;
- root /var/www/test.com;
- index index.html;
- location /{
- try_files $uri $uri/ =404;
- }
- #添加php解析
- location ~ .php$ {
- include snippets/fastcgi-php.conf;
- fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
- }
- }
server{
listen 80;
listen [::]:80;
server_name test.com;
root /var/www/test.com;
index index.html;
location /{
try_files $uri $uri/ =404;
}
#添加php解析
location ~ .php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
}
}