aboutsummaryrefslogtreecommitdiffstats
path: root/travis
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-03-05 12:45:25 +0100
committerMarc Alexander <admin@m-a-styles.de>2016-03-05 15:46:40 +0100
commit293a42e7c552346b1b9b13b6f4e6e050ce219408 (patch)
tree4fc28c0468cdb10aba23c3dbf2d6fe449b37b97e /travis
parent37b2791837425be17bb0703df900bc428a4fbb4b (diff)
downloadforums-293a42e7c552346b1b9b13b6f4e6e050ce219408.tar
forums-293a42e7c552346b1b9b13b6f4e6e050ce219408.tar.gz
forums-293a42e7c552346b1b9b13b6f4e6e050ce219408.tar.bz2
forums-293a42e7c552346b1b9b13b6f4e6e050ce219408.tar.xz
forums-293a42e7c552346b1b9b13b6f4e6e050ce219408.zip
[ticket/14497] Use nginx sample config in travis tests
PHPBB3-14497
Diffstat (limited to 'travis')
-rwxr-xr-xtravis/setup-webserver.sh22
1 files changed, 7 insertions, 15 deletions
diff --git a/travis/setup-webserver.sh b/travis/setup-webserver.sh
index 911ba12f3c..3369d740fe 100755
--- a/travis/setup-webserver.sh
+++ b/travis/setup-webserver.sh
@@ -57,20 +57,12 @@ else
fi
# nginx
-echo "
- server {
- listen 80;
- root $PHPBB_ROOT_PATH/;
- index index.php index.html;
-
- location ~ \.php {
- include fastcgi_params;
- fastcgi_split_path_info ^(.+\.php)(/.*)$;
- fastcgi_param PATH_INFO \$fastcgi_path_info;
- fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
- fastcgi_pass unix:$APP_SOCK;
- }
- }
-" | sudo tee $NGINX_CONF > /dev/null
+cat $DIR/../phpBB/docs/nginx.sample.conf \
+| sed "s/root \/path\/to\/phpbb/root $(echo $PHPBB_ROOT_PATH | sed -e 's/\\/\\\\/g' -e 's/\//\\\//g' -e 's/&/\\\&/g')/g" \
+| sed -e '1,/The actual board domain/d' \
+| sed -e '/If running php as fastcgi/,$d' \
+| sed -e "s/fastcgi_pass php;/fastcgi_pass unix:$(echo $APP_SOCK | sed -e 's/\\/\\\\/g' -e 's/\//\\\//g' -e 's/&/\\\&/g');/g" \
+| sed -e 's/#listen 80/listen 80/' \
+| sudo tee $NGINX_CONF
sudo service nginx start