From: Christian Heller Date: Thu, 6 Dec 2018 01:40:23 +0000 (+0100) Subject: Improve web server setup. X-Git-Url: https://plomlompom.com/repos/te"st.html?a=commitdiff_plain;h=96d8dcb5e35145324d2b4dc53d8cbed723beedd2;p=config Improve web server setup. --- diff --git a/all_new_2018/linkable_etc_files/web/etc/gitweb.conf b/all_new_2018/linkable_etc_files/web/etc/gitweb.conf index c89282b..71ce3c5 100644 --- a/all_new_2018/linkable_etc_files/web/etc/gitweb.conf +++ b/all_new_2018/linkable_etc_files/web/etc/gitweb.conf @@ -1,5 +1,5 @@ # path to git projects (.git) -$projectroot = "/var/www/public_repos"; +$projectroot = "/var/public_repos"; # directory to use for temp files # explicitely set by Debian so it's probably a good choice diff --git a/all_new_2018/linkable_etc_files/web/etc/nginx/nginx.conf b/all_new_2018/linkable_etc_files/web/etc/nginx/nginx.conf index ec3e5f9..5d95d2e 100644 --- a/all_new_2018/linkable_etc_files/web/etc/nginx/nginx.conf +++ b/all_new_2018/linkable_etc_files/web/etc/nginx/nginx.conf @@ -11,7 +11,7 @@ http { # define content-type headers types { text/html html htm shtml; - text/css css; + text/css css; text/xml xml; text/plain txt sh rst md; application/xhtml+xml xhtml; @@ -46,7 +46,7 @@ http { include fastcgi_params; fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend; fastcgi_param GIT_HTTP_EXPORT_ALL ""; - fastcgi_param GIT_PROJECT_ROOT /var/www/public_repos; + fastcgi_param GIT_PROJECT_ROOT /var/public_repos; fastcgi_param PATH_INFO $1; fastcgi_pass unix:/var/run/fcgiwrap.socket; } @@ -59,8 +59,8 @@ http { # gitweb; this needs packages fcgiwrap and gitweb location /repos/ { include fastcgi_params; - fastcgi_param SCRIPT_FILENAME /usr/share/gitweb/gitweb.cgi; - fastcgi_param GITWEB_CONFIG /etc/gitweb.conf; + fastcgi_param SCRIPT_FILENAME /usr/share/gitweb/gitweb.cgi; + fastcgi_param GITWEB_CONFIG /etc/gitweb.conf; fastcgi_pass unix:/var/run/fcgiwrap.socket; } } diff --git a/all_new_2018/setup_web.sh b/all_new_2018/setup_web.sh old mode 100644 new mode 100755 index 55edd39..8cd1401 --- a/all_new_2018/setup_web.sh +++ b/all_new_2018/setup_web.sh @@ -5,4 +5,7 @@ set -e sed -i "s/REPLACE_fqdn_ECALPER/$(hostname -f)/g" /etc/nginx/nginx.conf sed -i "s/REPLACE_fqdn_ECALPER/$(hostname -f)/g" /etc/gitweb.conf apt -y -o Dpkg::Options::=--force-confold install nginx gitweb fcgiwrap +cd /var/ +rm -rf www +git clone plom@core.plomlompom.com:repos/website www iptables-restore /etc/iptables/rules.v4