diff --git a/docker-compose.yml b/docker-compose.yml index 5214b40..464cc05 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -37,6 +37,7 @@ services: - lmt-dev - traefik-proxy-blumilk-local restart: unless-stopped + mailpit: image: axllent/mailpit:v1.14.4 container_name: lmt-dev-mailpit-container diff --git a/environment/dev/app/nginx.conf b/environment/dev/app/nginx.conf index 7854b12..1af46ad 100644 --- a/environment/dev/app/nginx.conf +++ b/environment/dev/app/nginx.conf @@ -22,7 +22,7 @@ http { sendfile on; keepalive_timeout 65; -server { + server { listen 80 default; server_name lmt-nginx; @@ -30,7 +30,18 @@ server { error_log /dev/stderr; root /application/public; - index meetup.html; + index index.html; + + location = /meetup.html { + if ($arg_meetupId) { + return 301 /meetup?$query_string; + } + return 404; # Return 404 if no meetupId is present + } + + location = /meetup { + try_files /meetup.html =404; + } location / { try_files $uri $uri/ =404; diff --git a/environment/dev/nginx/nginx.conf b/environment/dev/nginx/nginx.conf deleted file mode 100644 index ef07b52..0000000 --- a/environment/dev/nginx/nginx.conf +++ /dev/null @@ -1,10 +0,0 @@ -server { - listen 80; - server_name localhost; - - location / { - root /application/public; - index meetup.html; - try_files $uri $uri/ =404; - } -} diff --git a/environment/prod/app/nginx.conf b/environment/prod/app/nginx.conf index 7854b12..0bd53da 100644 --- a/environment/prod/app/nginx.conf +++ b/environment/prod/app/nginx.conf @@ -22,24 +22,35 @@ http { sendfile on; keepalive_timeout 65; -server { - listen 80 default; - server_name lmt-nginx; - - access_log /dev/stdout; - error_log /dev/stderr; - - root /application/public; - index meetup.html; - - location / { - try_files $uri $uri/ =404; - } - - location ~ \.php$ { - fastcgi_pass unix:/run/php-fpm.sock; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include fastcgi_params; + server { + listen 80 default; + server_name lmt-nginx; + + access_log /dev/stdout; + error_log /dev/stderr; + + root /application/public; + index index.html; + + location = /meetup.html { + if ($arg_meetupId) { + return 301 /meetup?$query_string; + } + return 404; # Return 404 if no meetupId is present + } + + location = /meetup { + try_files /meetup.html =404; + } + + location / { + try_files $uri $uri/ =404; + } + + location ~ \.php$ { + fastcgi_pass unix:/run/php-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } } - } } diff --git a/public/pastMeetup.html b/public/index.html similarity index 63% rename from public/pastMeetup.html rename to public/index.html index 7ac79fb..13faa29 100644 --- a/public/pastMeetup.html +++ b/public/index.html @@ -16,20 +16,27 @@ content="https://meetup.legnica.pl/images/fb_image.jpg" /> + +