附录:
参考链接一:https://www.cnblogs.com/zhanjindong/archive/2014/01/23/3531733.html
参考链接二:https://blog.csdn.net/qq_31772441/article/details/107072652
# aaa.com
location /reservation/ {
proxy_pass http://reservation-template.com/;
}
# reservation-template.com
server {
listen 80;
server_name reservation-template.com;
root /www/reservation_template/public;
add_header 'Access-Control-Allow-Origin' *;
add_header 'Access-Control-Allow-Headers' *;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' *;
location / {
index index.html index.htm index.php;
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
root /www/reservation_template;
fastcgi_pass 127.0.0.1:9800;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /www/reservation_template/public/$fastcgi_script_name;
include fastcgi_params;
}
}