-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #379 from netlogix/feature/SHOPWARE-124-nginx-config
Feature/shopware 124 nginx config
- Loading branch information
Showing
2 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
include includes/defaults; | ||
|
||
root /var/www/public; | ||
|
||
location ~ ^/(theme|media|thumbnail|bundles|css|fonts|js|recovery|sitemap)/ { | ||
expires 1y; | ||
add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | ||
log_not_found off; | ||
tcp_nodelay off; | ||
open_file_cache max=3000 inactive=120s; | ||
open_file_cache_valid 45s; | ||
open_file_cache_min_uses 2; | ||
open_file_cache_errors off; | ||
|
||
location ~* ^.+\.svg { | ||
add_header Content-Security-Policy "script-src 'none'"; | ||
add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | ||
log_not_found off; | ||
} | ||
} | ||
|
||
location ~* ^.+\.(?:css|cur|js|jpe?g|gif|ico|png|svg|webp|html|woff|woff2|xml)$ { | ||
expires 1y; | ||
add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | ||
|
||
access_log off; | ||
|
||
# The directive enables or disables messages in error_log about files not found on disk. | ||
log_not_found off; | ||
|
||
tcp_nodelay off; | ||
|
||
## Set the OS file cache. | ||
open_file_cache max=3000 inactive=120s; | ||
open_file_cache_valid 45s; | ||
open_file_cache_min_uses 2; | ||
open_file_cache_errors off; | ||
|
||
try_files $uri /index.php$is_args$args; | ||
} | ||
|
||
location ~* ^.+\.svg$ { | ||
add_header Content-Security-Policy "script-src 'none'"; | ||
} | ||
|
||
location / { | ||
try_files $uri /index.php$is_args$args; | ||
} | ||
|
||
location ~ \.php$ { | ||
fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
include fastcgi_params; | ||
fastcgi_param HTTP_PROXY ""; | ||
fastcgi_buffers 8 16k; | ||
fastcgi_buffer_size 32k; | ||
fastcgi_param REQUEST_METHOD $request_method; | ||
fastcgi_param SCRIPT_FILENAME $request_filename; | ||
proxy_connect_timeout 300s; | ||
proxy_send_timeout 300s; | ||
proxy_read_timeout 300s; | ||
send_timeout 300s; | ||
client_body_buffer_size 128k; | ||
fastcgi_pass shop_backend; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
upstream shop_backend { | ||
server ${FPM_BACKEND}; | ||
} | ||
|
||
server { | ||
listen 80; | ||
|
||
server_name ${SHOP_DOMAIN}; | ||
|
||
include includes/shopware6; | ||
} |