For installing and serving Konga behind Nginx reverse proxy we first clone the project and install npm modules and run :
git clone https://github.com/pantsel/konga.git
cd konga
npm i
npm run start
It is time to add the reverse proxy in Nginx as below:
sudo vim /etc/nginx/nginx.conf
server {
location ^~ /konga/ {
proxy_pass http://localhost:1337/;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
}
Then you need to restart nginx :
sudo service nginx restart