Laravel 第一版 Nginx 問題修正 20250529

This commit is contained in:
allen.yan 2025-05-29 17:56:04 +08:00
parent 4f5ccb533a
commit 4edbb6bf00
2 changed files with 2 additions and 5 deletions

View File

@ -1,6 +1,6 @@
server {
listen 80 default_server;
server_name $APP_DOMAIN;
server_name {};
root /var/www/html/public;
index index.php index.html;

View File

@ -45,12 +45,9 @@ services:
- "8080:80"
volumes:
- ./data:/var/www
- ./docker/nginx/default.conf.template:/etc/nginx/conf.d/default.conf.template
- ./default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- app
environment:
APP_DOMAIN: ${APP_DOMAIN}
command: /bin/sh -c "envsubst '\$APP_DOMAIN' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
networks:
- app_network