Skip to content

Commit

Permalink
Update redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Sep 22, 2023
1 parent 3394cc2 commit 2b71dc1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
1 change: 0 additions & 1 deletion images/web/config/lighttpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,3 @@ fastcgi.server = ( ".map" =>
"check-local" => "disable",
))
)

19 changes: 16 additions & 3 deletions images/web/config/production.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,28 @@
# CGIPassAuth On
# </Location>

# Handle OPTIONS requests
# RewriteCond %{REQUEST_METHOD} OPTIONS
# RewriteRule ^.*$ "" [R=200,L]

# ======Redirect trafict to CGIMAP====
# Rules to redirect to port 81
RewriteCond %{HTTP_HOST} =staging.openhistoricalmap.org
RewriteCond %{REQUEST_URI} ^/api/0\.6/map
RewriteRule ^.*$ http://127.0.0.1:81%{REQUEST_URI} [P,L]
# Existing rewrites
RewriteRule ^0\.6/map$ - [L,H=fcgi:127.0.0.1:81]
RewriteRule ^0\.6/(nodes|ways|relations)$ - [L,H=fcgi:127.0.0.1:81]
RewriteRule ^0\.6/(way|relation)/([^/]+)/full$ - [L,H=fcgi:127.0.0.1:81]
RewriteRule ^0\.6/map$ - [L,H=fcgi:http://127.0.0.1:81]
RewriteRule ^0\.6/(nodes|ways|relations)$ - [L,H=fcgi:http://127.0.0.1:81]
RewriteRule ^0\.6/(way|relation)/([^/]+)/full$ - [L,H=fcgi:http://127.0.0.1:81]


# # Limit allowed methods for /api/0.6/map
# <Location /api/0.6/map>
# <LimitExcept GET POST PUT DELETE OPTIONS>
# Order Deny,Allow
# Deny from all
# </LimitExcept>
# </Location>

# Relax Apache security settings
<Directory /var/www/public>
Expand Down

0 comments on commit 2b71dc1

Please sign in to comment.