-
-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Hey, cool Product!
I try to run it as Sub-path on Apache2 Server e.g. https://FQDN/pasty/
with few rewrite rules, but not really successful.
- I use docker compose
version: "3.6"
services:
pasty:
image: ghcr.io/lus/pasty:latest
container_name: pasty
restart: unless-stopped
environment:
- PASTY_AUTODELETE="true"
- PASTY_AUTODELETE_LIFETIME="336h"
- PASTY_AUTODELETE_TASK_INTERVAL="24h"
ports:
- "9016:8080"
- Now it works on my
localhost:9016
- I see that there a 2 endpoints, webUI and api calls, so I add Apache2 Rewrite rules:
#Pasty
<Location /api/v2/>
RewriteEngine on
RewriteRule /api/v2/(.*) http://localhost:9016/api/v2/$1 [P,L]
ProxyPreserveHost On
ProxyPass http://localhost:9016/api/v2/ retry=0 connectiontimeout=5 timeout=30 keepalive=on
ProxyPassReverse http://localhost:9016/api/v2/
RequestHeader set Connection ""
</Location>
Redirect 301 "/pasty" "/pasty/"
<Location /pasty/>
ProxyPreserveHost On
ProxyPass http://localhost:9016/ retry=0 connectiontimeout=5 timeout=30 keepalive=on
ProxyPassReverse http://localhost:9016/
RequestHeader set Connection ""
</Location>
- Not really works:(((
How to expose this app as Subpath?