This took me longer than I'd like to admit, but, to be honest, their documentation is not on point.
Grocy is a web-based self-hosted groceries & household management solution for your home.
I already have a few services running on my home server, sitting behind my faithful Apache, accessible from a custom domain.
I don't want it running as a subdomain. Every explanation I found assumes that.
TL:DR: If you want Grocy running behind an Apache proxy, set it up like this:
$ cd /tmp
$ wget https://releases.grocy.info/latest
$ sudo unzip latest -d /var/www/html/grocy/
- Copy the Grocy configuration file and change it to your liking:
$ sudo cp /var/www/html/grocy/config-dist.php /var/www/html/grocy/data/config.php
- The important settings here are:
And they should be setup just like this for usage with a subdomain and Apache.
- Create a configuration file in Apache for Grocy:
$ sudo vim /etc/apache2/sites-available/grocy.home.your-domain.pt.conf
- Adapt the following to your configuration. The relevant part here is the DocumentRoot, and the Directory. Don't forget to set the full path to the Grocy public folder :
CustomLog /var/log/apache2/grocy-access.log combined
Options Indexes FollowSymLinks MultiViews
allow from all
$ sudo a2ensite grocy.home.your-domain.pt
$ sudo systemctl reload apache2
And your instance if running on http://grocy.home.your-domain.pt!
I've made a few assumptions here (you have your own local domain, have Apache already setup with PHP, etc), but I hope is helpful to someone.
Maybe later I'll update this post with a more detailed explanation.