Skip to content

Commit cf5e06b

Browse files
author
Tobias Lückel
committed
Changed config structure because we do not want to include shopware.conf automatically / Extracted some locations out of default.conf to be able to reuse it
1 parent 57fc8b0 commit cf5e06b

File tree

5 files changed

+65
-110
lines changed

5 files changed

+65
-110
lines changed

bin/sdTest.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ function init_environment {
5757
echo "Prepare directories"
5858
mkdir -p ${PROJECT_DIR}/etc/test
5959
mkdir -p ${PROJECT_DIR}/etc/test/nginx
60+
mkdir -p ${PROJECT_DIR}/etc/test/nginx/conf.d
6061
mkdir -p ${PROJECT_DIR}/etc/test/php
6162

6263
echo "Copying testing README"
@@ -67,7 +68,7 @@ function init_environment {
6768

6869
echo "Copying config files to be able to easily modify it for special needs"
6970
cp ${PACKAGE_DIR}/php/* ${PROJECT_DIR}/etc/test/php
70-
cp ${PACKAGE_DIR}/nginx/* ${PROJECT_DIR}/etc/test/nginx
71+
cp -R ${PACKAGE_DIR}/nginx/* ${PROJECT_DIR}/etc/test/nginx
7172

7273
echo "You can find additional information in the testing README, see 'README.TESTING.md'"
7374
}

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ services:
1515
- shared_www:/var/www:delegated
1616
- ${PROJECT_DIR}:/opt/host:delegated
1717
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
18-
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
19-
- ./nginx/shopware.conf:/etc/nginx/conf.d/shopware.conf
18+
- ./nginx/include.shopware.conf:/etc/nginx/include.shopware.conf
19+
- ./nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
2020
links:
2121
- shopware546_php72
2222
- shopware546_php71

nginx/conf.d/default.conf

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
server {
2+
server_name localhost;
3+
listen 10872;
4+
5+
#access_log /var/logs/nginx_access.log;
6+
root /var/www/shopware54_php72;
7+
set $fastcgi_pass shopware546_php72:9000;
8+
9+
include /etc/nginx/include.shopware.conf;
10+
}
11+
12+
server {
13+
server_name localhost;
14+
listen 10871;
15+
16+
#access_log /var/logs/nginx_access.log;
17+
root /var/www/shopware54_php71;
18+
set $fastcgi_pass shopware546_php71:9000;
19+
20+
include /etc/nginx/include.shopware.conf;
21+
}
22+
23+
server {
24+
server_name localhost;
25+
listen 10870;
26+
27+
#access_log /var/logs/nginx_access.log;
28+
root /var/www/shopware54_php70;
29+
set $fastcgi_pass shopware546_php70:9000;
30+
31+
include /etc/nginx/include.shopware.conf;
32+
}
33+
34+
server {
35+
server_name localhost;
36+
listen 10856;
37+
38+
#access_log /var/logs/nginx_access.log;
39+
root /var/www/shopware54_php56;
40+
set $fastcgi_pass shopware546_php56:9000;
41+
42+
include /etc/nginx/include.shopware.conf;
43+
}

nginx/default.conf

Lines changed: 0 additions & 107 deletions
This file was deleted.

nginx/include.shopware.conf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
client_max_body_size 128M;
2+
3+
location / {
4+
# try to serve file directly, fallback to index.php
5+
try_files $uri /shopware.php$is_args$args;
6+
}
7+
8+
location ~ ^/shopware\.php(/|$) {
9+
fastcgi_pass $fastcgi_pass;
10+
fastcgi_split_path_info ^(.+\.php)(/.*)$;
11+
12+
include fastcgi_params;
13+
14+
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
15+
fastcgi_param DOCUMENT_ROOT $realpath_root;
16+
17+
#internal;
18+
}

0 commit comments

Comments
 (0)