pixelfed-imgproxy-apache2/README.md

28 lines
754 B
Markdown
Raw Normal View History

2020-10-08 13:03:03 +00:00
# pixelfed-imgproxy-apache2
2020-10-08 13:18:48 +00:00
Media proxy project for pixelfed. This project makes images,
videos from remote pixelfed instances URLs proxied through the homeserver.
## Installation (standalone)
Copy the code to your pixelfed installation
```bash
cp -a imgproxy /var/www/public/imgproxy
```
Add the following lines in your apache Virtualhost configuration
(replace pixel.nogafam.es to your instance URL)
```apache2
AddOutputFilterByType SUBSTITUTE application/json
Substitute "s@(?<=\")https:\\\/\\\/[^\"]+\.(png|jpg|jpeg)@https:\\\/\\\/pixel.nogafam.es\\\/imgproxy\\\/?url=$0@i"
Substitute "s@(?<=\")https://[^\"]+\.(png|jpg|jpeg)@https://pixel.nogafam.es/imgproxy/?url=$0@i"
```
Enable `mod_substitute` on Apache
```bash
a2enmod substitute
```