Arch Linux
I started with a pre-fab VM image of Arch Linux
https://geo.mirror.pkgbuild.com/images/latest/
wget https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-basic.qcow2
wget https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-basic.qcow2.SHA256
wget https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-basic.qcow2.sig

I used the grocy package in AUR
https://aur.archlinux.org/packages/grocy

I installed yay-bin
https://github.com/Jguer/yay#installation

I used Apache
yay -S apache php-apache

[arch@grocy-archlinux ~]$ systemctl status httpd.service 
○ httpd.service - Apache Web Server
     Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; preset: disabled)
     Active: inactive (dead)

sudo mkdir /etc/httpd/conf/vhosts

In /etc/httpd/conf/httpd.conf
Set these options to be uncommented or commented-out if they start with #
Include conf/vhosts/grocy.dom
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
#LoadModule mpm_event_module modules/mod_mpm_event.so
LoadModule rewrite_module modules/mod_rewrite.so
Place this at the end of the LoadModule list:
LoadModule php_module modules/libphp.so
AddHandler php-script .php
Place this at the end of the Include list:
Include conf/extra/php_module.conf

Change the hostname example.com to be you hostname.
Create /etc/httpd/conf/vhosts/grocy.dom 
<VirtualHost *:80>
	ServerName example.com

	DocumentRoot /usr/share/webapps/grocy/public
	AcceptPathInfo on

	<Directory /usr/share/webapps/grocy/public>
  	        Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Require all granted
	</Directory>

	## Logging
	ErrorLog "/var/log/httpd/grocy_error.log"
	ServerSignature Off
	CustomLog "/var/log/httpd/grocy_access.log" combined 
</VirtualHost>

By admin

Leave a Reply

Your email address will not be published.