From 85967ef5d54f6efbc7ff2f2e9d5126d8197cf43b Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Sat, 14 Jan 2017 10:08:58 +0000 Subject: clean url in gitweb --- .../etc/nginx/sites-enabled/git.localhost.conf | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tools/conf/etc/nginx/sites-enabled/git.localhost.conf (limited to 'tools/conf/etc/nginx') diff --git a/tools/conf/etc/nginx/sites-enabled/git.localhost.conf b/tools/conf/etc/nginx/sites-enabled/git.localhost.conf new file mode 100644 index 0000000..0cef2b1 --- /dev/null +++ b/tools/conf/etc/nginx/sites-enabled/git.localhost.conf @@ -0,0 +1,31 @@ +server { + listen 443 ssl; + + server_name git.localhost git.c9.core git.core.privat-network.net; + + root /srv/www/gitweb; + +# location / { +# index gitweb.cgi; +# } + +# location /gitweb.cgi { +# include fastcgi_params; +# gzip off; +# fastcgi_param SCRIPT_FILENAME /srv/www/gitweb/gitweb.cgi; +# fastcgi_param GITWEB_CONFIG /etc/gitweb.conf; +# fastcgi_pass unix:/var/run/fcgiwrap.sock; +# } + + location / { + index gitweb.cgi + fastcgi_param GITWEB_CONFIG /etc/gitweb.conf; + fastcgi_param DOCUMENT_ROOT /srv/www/gitweb/; + fastcgi_param SCRIPT_NAME /gitweb.cgi$fastcgi_path_info; + fastcgi_split_path_info ^()(/?.+)$; + + include fastcgi_params; + fastcgi_pass unix:/var/run/fcgiwrap.sock; + } + +} -- cgit 1.4.1-2-gfad0 From 066ba96efe43daba9138b36b9ac3473d7607c8bc Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Sat, 14 Jan 2017 10:38:11 +0000 Subject: fix tools nginx gitweb server --- .../etc/nginx/sites-enabled/git.localhost.conf | 30 +++++++++------------- 1 file changed, 12 insertions(+), 18 deletions(-) (limited to 'tools/conf/etc/nginx') diff --git a/tools/conf/etc/nginx/sites-enabled/git.localhost.conf b/tools/conf/etc/nginx/sites-enabled/git.localhost.conf index 0cef2b1..d114ab8 100644 --- a/tools/conf/etc/nginx/sites-enabled/git.localhost.conf +++ b/tools/conf/etc/nginx/sites-enabled/git.localhost.conf @@ -5,27 +5,21 @@ server { root /srv/www/gitweb; -# location / { -# index gitweb.cgi; -# } - -# location /gitweb.cgi { -# include fastcgi_params; -# gzip off; -# fastcgi_param SCRIPT_FILENAME /srv/www/gitweb/gitweb.cgi; -# fastcgi_param GITWEB_CONFIG /etc/gitweb.conf; -# fastcgi_pass unix:/var/run/fcgiwrap.sock; -# } + location /static/ { + # static files (png/css) served from /usr/share/gitweb/static + root /usr/share/gitweb ; + expires 30d; + } location / { - index gitweb.cgi - fastcgi_param GITWEB_CONFIG /etc/gitweb.conf; - fastcgi_param DOCUMENT_ROOT /srv/www/gitweb/; - fastcgi_param SCRIPT_NAME /gitweb.cgi$fastcgi_path_info; - fastcgi_split_path_info ^()(/?.+)$; + index gitweb.cgi + fastcgi_param GITWEB_CONFIG /etc/gitweb.conf; + fastcgi_param DOCUMENT_ROOT /srv/www/gitweb/; + fastcgi_param SCRIPT_NAME /gitweb.cgi$fastcgi_path_info; + fastcgi_split_path_info ^()(/?.+)$; - include fastcgi_params; - fastcgi_pass unix:/var/run/fcgiwrap.sock; + include fastcgi_params; + fastcgi_pass unix:/var/run/fcgiwrap.sock; } } -- cgit 1.4.1-2-gfad0