From 2413ded220fc0a946603813b4ff78b329ed39231 Mon Sep 17 00:00:00 2001 From: DrMxrcy Date: Wed, 22 Mar 2023 15:08:59 -0400 Subject: [PATCH] Update Nginx --- apps/mixpost/data/nginx/nginx.conf | 32 ++++++++++++++++++++++++++++++ apps/mixpost/docker-compose.yml | 3 ++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 apps/mixpost/data/nginx/nginx.conf diff --git a/apps/mixpost/data/nginx/nginx.conf b/apps/mixpost/data/nginx/nginx.conf new file mode 100644 index 00000000..5610093a --- /dev/null +++ b/apps/mixpost/data/nginx/nginx.conf @@ -0,0 +1,32 @@ +map $http_x_forwarded_proto $fcgi_https { + default off; + https on; +} + +server { + listen 80; + root /var/www/html/public; + index index.php index.html; + client_max_body_size 200M; + + location / { + try_files $uri /index.php?$args; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; + + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_param HTTPS $fcgi_https; + fastcgi_read_timeout 1000; + proxy_set_header X-Real-IP $remote_addr; + proxy_buffer_size 128k; + proxy_buffers 4 256k; + proxy_busy_buffers_size 256k; + } +} \ No newline at end of file diff --git a/apps/mixpost/docker-compose.yml b/apps/mixpost/docker-compose.yml index c94d191d..cb2524aa 100644 --- a/apps/mixpost/docker-compose.yml +++ b/apps/mixpost/docker-compose.yml @@ -6,7 +6,7 @@ services: container_name: mixpost environment: - APP_NAME='Mixpost' - - APP_KEY='${MIXPOST_APP_KEY}'' + - APP_KEY='${MIXPOST_APP_KEY}' - APP_URL='https://${APP_DOMAIN}' - DB_HOST=mixpost-mysql - DB_DATABASE=mixpost @@ -18,6 +18,7 @@ services: volumes: - ${APP_DATA_DIR}/data/mixpost-storage:/var/www/html/storage/app - ${APP_DATA_DIR}/data/mixpost-logs:/var/www/html/storage/logs + - ${APP_DATA_DIR}/data/nginx/nginx.conf:/etc/nginx/sites-enabled/default ports: - ${APP_PORT}:80 depends_on: