| @@ -0,0 +1,11 @@ | |||||
| base: gitea-custom | |||||
| steps: | |||||
| - run: | |||||
| - ASSUME_ALWAYS_YES=yes IGNORE_OSVERSION=yes pkg install nginx | |||||
| - sysrc nginx_enable=YES | |||||
| - copy: | |||||
| - [ files/nginx.conf, | |||||
| /usr/local/etc/nginx/nginx.conf ] | |||||
| - [ files/403.html, | |||||
| /usr/local/share/gitea/public/403.html ] | |||||
| @@ -0,0 +1,13 @@ | |||||
| <!DOCTYPE html> | |||||
| <html> | |||||
| <head> | |||||
| <link rel="stylesheet" type="text/css" href="/css/index.css" /> | |||||
| </head> | |||||
| <body> | |||||
| <div style="border-radius: .28571429rem; border-width: 1px; border-style: solid; border-color: rgba(34, 36, 38, 0.15); padding: 1em;"> | |||||
| <h1>403 Forbidden</h1> | |||||
| <p>Issues, Releases and Wiki are disabled for forked repositories. Please use the source repository for those.</p> | |||||
| <p><a href="javascript:history.back()">Go Back</a></p> | |||||
| </div> | |||||
| </body> | |||||
| </html> | |||||
| @@ -0,0 +1,27 @@ | |||||
| worker_processes 1; | |||||
| events { | |||||
| worker_connections 1024; | |||||
| } | |||||
| http { | |||||
| include mime.types; | |||||
| default_type application/octet-stream; | |||||
| server { | |||||
| listen 80; | |||||
| location / { | |||||
| rewrite ^/admin1/ $uri break; | |||||
| if ($uri ~ ^/([^/]*)/([^/]*)/(wiki|releases|issues)) { | |||||
| return 403; | |||||
| } | |||||
| root /usr/local/share/gitea/public; | |||||
| error_page 403 /403.html; | |||||
| proxy_pass http://localhost:3000/; | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -2,6 +2,7 @@ images: | |||||
| gitea: . | gitea: . | ||||
| gitea-logo: ../gitea-logo | gitea-logo: ../gitea-logo | ||||
| gitea-custom: ../gitea-custom | gitea-custom: ../gitea-custom | ||||
| gitea-disable: ../gitea-disable | |||||
| certbot-latest: ../certbot | certbot-latest: ../certbot | ||||
| volumes: | volumes: | ||||
| @@ -15,7 +16,7 @@ jails: | |||||
| domains: | domains: | ||||
| - xyz.com | - xyz.com | ||||
| - www.xyz.com | - www.xyz.com | ||||
| image: gitea-custom | |||||
| image: gitea-disable | |||||
| mounts: | mounts: | ||||
| gitea-data: /var/db/gitea | gitea-data: /var/db/gitea | ||||
| ip4.addr: 127.0.8.1 | ip4.addr: 127.0.8.1 | ||||