|
1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- worker_processes 1;
-
- events {
- worker_connections 1024;
- }
-
- http {
- include mime.types;
- default_type application/octet-stream;
-
- server {
- listen 80;
-
- location / {
- error_page 403 /403.html;
-
- set $test "";
- if ($uri ~ ^/api) {
- set $test "api";
- }
- rewrite ^/admin1/ $uri break;
- if ($uri ~ ^/([^/]*)/([^/]*)/(wiki|releases|issues)) {
- return 403;
- }
- rewrite ^/([^/]*)/([^/]*)/settings/(collaboration|branches) $uri break;
- if ($uri ~ ^/([^/]*)/([^/]*)/settings) {
- set $test "settings";
- }
- if ($request_method != "GET") {
- set $test "${test}_not-get";
- }
- if ($test = "settings_not-get") {
- return 403;
- }
- if ($test = "api_not-get") {
- return 403;
- }
-
- root /usr/local/share/gitea/public;
-
- proxy_pass http://localhost:3000/;
- }
- }
- }
|