From e5a1bcb814b71b9b1a1a77a19099254d7c572837 Mon Sep 17 00:00:00 2001 From: Joe Date: Sat, 30 Apr 2022 16:46:43 +0000 Subject: udpate --- usr/local/etc/cgitrc | 12 ++++----- usr/local/etc/nginx/nginx.conf | 60 ++++++++++++++++++++++++------------------ 2 files changed, 41 insertions(+), 31 deletions(-) diff --git a/usr/local/etc/cgitrc b/usr/local/etc/cgitrc index 3e2a45b..690a98a 100644 --- a/usr/local/etc/cgitrc +++ b/usr/local/etc/cgitrc @@ -2,19 +2,19 @@ # cgit config # -css=/cgit.css -logo=/cgit.png - -favicon=/favicon.png +css=/css/cgit.css +logo=/img/cgit.png +favicon=/img/favicon.ico # if you do not want that webcrawler (like google) index your site -robots=noindex, nofollow +robots=index, nofollow # if cgit messes up links, use a virtual-root. For example, cgit.example.org/ has this value: virtual-root=/ root-title=GitJoe root-desc=where the good code belongs +root-readme=/usr/local/www/cgit/about.html footer=/usr/local/www/cgit/footer.html clone-url=git://gitjoe.xyz/$CGIT_REPO_URL @@ -86,4 +86,4 @@ readme=:install.txt readme=:INSTALL readme=:install -scan-path=/usr/local/git +#scan-path=/usr/local/git diff --git a/usr/local/etc/nginx/nginx.conf b/usr/local/etc/nginx/nginx.conf index 904604c..cb034ba 100644 --- a/usr/local/etc/nginx/nginx.conf +++ b/usr/local/etc/nginx/nginx.conf @@ -52,11 +52,13 @@ http { listen 443 ssl; # managed by Certbot - ssl_certificate /usr/local/etc/letsencrypt/live/jozanofastora.xyz-0001/fullchain.pem; # managed by Certbot - ssl_certificate_key /usr/local/etc/letsencrypt/live/jozanofastora.xyz-0001/privkey.pem; # managed by Certbot + ssl_certificate /usr/local/etc/letsencrypt/live/git.jozanofastora.xyz/fullchain.pem; # managed by Certbot + ssl_certificate_key /usr/local/etc/letsencrypt/live/git.jozanofastora.xyz/privkey.pem; # managed by Certbot include /usr/local/etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /usr/local/etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot + + } server{ @@ -71,22 +73,6 @@ http { location ~ /\.ht { deny all; } -# location @jozan { -# include fastcgi_params; -# root /usr/local/www/gitjoe/jozan; -# try_files $uri @jozan; -# index cgit.cgi; -# fastcgi_param SCRIPT_FILENAME $document_root/cgit.cgi; -# fastcgi_param PATH_INFO $uri; -# fastcgi_param QUERY_STRING $args; -# fastcgi_param HTTP_HOST $server_name; -# fastcgi_param CGIT_CONFIG /usr/local/etc/cgitusers/jozan; -# fastcgi_pass unix:/var/run/fcgiwrap/fcgiwrap.sock; -# -# gzip off; -# #rewrite ^ https://$server_name$request_uri permanent; -# rewrite ^/([^/]+/.*)?$ /cgit.cgi?url=$1 break; -# } error_page 403 /403.html; location = /403.html { root /usr/local/www/gitjoe/err; @@ -102,16 +88,18 @@ http { listen 443 ssl; # managed by Certbot - ssl_certificate /usr/local/etc/letsencrypt/live/jozanofastora.xyz-0001/fullchain.pem; # managed by Certbot - ssl_certificate_key /usr/local/etc/letsencrypt/live/jozanofastora.xyz-0001/privkey.pem; # managed by Certbot + ssl_certificate /usr/local/etc/letsencrypt/live/git.jozanofastora.xyz/fullchain.pem; # managed by Certbot + ssl_certificate_key /usr/local/etc/letsencrypt/live/git.jozanofastora.xyz/privkey.pem; # managed by Certbot include /usr/local/etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /usr/local/etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot + + + } server { - listen 80; server_name repos.gitjoe.xyz; root /usr/local/www/cgit; try_files $uri @cgit; @@ -135,7 +123,14 @@ http { root /usr/local/www/nginx-dist; } - } + + listen 443 ssl; # managed by Certbot + ssl_certificate /usr/local/etc/letsencrypt/live/git.jozanofastora.xyz/fullchain.pem; # managed by Certbot + ssl_certificate_key /usr/local/etc/letsencrypt/live/git.jozanofastora.xyz/privkey.pem; # managed by Certbot + include /usr/local/etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot + ssl_dhparam /usr/local/etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot + +} server { server_name fossil.jozanofastora.xyz; @@ -166,14 +161,29 @@ http { listen 443 ssl; # managed by Certbot - ssl_certificate /usr/local/etc/letsencrypt/live/jozanofastora.xyz-0001/fullchain.pem; # managed by Certbot - ssl_certificate_key /usr/local/etc/letsencrypt/live/jozanofastora.xyz-0001/privkey.pem; # managed by Certbot + ssl_certificate /usr/local/etc/letsencrypt/live/git.jozanofastora.xyz/fullchain.pem; # managed by Certbot + ssl_certificate_key /usr/local/etc/letsencrypt/live/git.jozanofastora.xyz/privkey.pem; # managed by Certbot include /usr/local/etc/letsencrypt/options-ssl-nginx.conf; # managed by Ce/srvrtbot ssl_dhparam /usr/local/etc/letsencrypt/ssl-dhparams.pem; # managed by Cert/srvbot - } + +} + + + +server { + if ($host = repos.gitjoe.xyz) { + return 301 https://$host/?p=about; + } # managed by Certbot + listen 80; + server_name repos.gitjoe.xyz; + return 404; # managed by Certbot + + +} + server{ if ($host = git.jozanofastora.xyz) { return 301 https://gitjoe.xyz$request_uri; -- cgit v1.2.3