Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions laravel/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ARG FROM_IMAGE=skpr/nginx-fpm-php:v2-latest
FROM ${FROM_IMAGE}

COPY --chown=skpr:skpr etc /etc
2 changes: 2 additions & 0 deletions laravel/dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ARG FROM_IMAGE=skpr/nginx-fpm-laravel:v2-latest
FROM ${FROM_IMAGE}
57 changes: 57 additions & 0 deletions laravel/etc/nginx/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
map $http_cloudfront_forwarded_proto $cloudfront_proto {
default "http";
https "https";
}

map $http_cloudfront_forwarded_proto $cloudfront_https {
default "off";
https "on";
}

map $http_cloudfront_forwarded_proto $strict_transport_security {
default "";
https "max-age=31536000";
}

map $http_x_amzn_trace_id $processed_request_id {
default "$http_x_amzn_trace_id";
'' "$request_id";
}

map $uri $static_status_code {
include /etc/nginx/static_status_codes.conf;
}

map $host$uri $redirectdomain {
include /etc/nginx/redirects.conf;
}

map $request_uri $header_x_robots_tag {
include /etc/nginx/robots.conf;
}

include /etc/nginx/http.conf;

server {
listen 8080;

root /data/public;
Copy link
Copy Markdown
Contributor Author

@mstrelan mstrelan Feb 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nickschuch If this is the only difference is there a way we can set it via a build arg or something?


port_in_redirect off;

if ($redirectdomain) {
return 301 $redirectdomain;
}

if ($static_status_code = 404) {
return 404;
}

if ($static_status_code = 403) {
return 403;
}

include /etc/nginx/conf.d/header/*.conf;
include /etc/nginx/conf.d/location/*.conf;
include /etc/nginx/conf.d/overrides/*.conf;
}