Answer the question
In order to leave comments, you need to log in
How to connect back and front SPA in nginx?
Here is my nginx conf
worker_processes 8;
error_log logs/error.log warn;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
client_max_body_size 150m;
server {
listen 80;
server_name localhost;
location / {
root C:\OSPanel\domains\meatfood\dist;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location ~ \.php$ {
#root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
}
}
url : '/ajax/send.php'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question