I needed to setup scriptalias for my vagrant machine for apache in puppet yaml configuration, but could not find a way to do it, without using buildin predefined cgi-bin scriptalias name. I found question elsewhere on google, but it was not replied.
try with usual approach
scriptalias: pma vendor/phpmyadmin/phpmyadmim
resulted in
ScriptAlias /cgi-bin/ pma vendor/phpmyadmin/phpmyadmin
which was not satisfactory
I try to reply it as at the same time i found the answer after few days, after studying vagrant template _aliases.erb, i found out it must be setup as yaml array in vhost configuration
servername:
aliases:
-
aliasmatch: /pma(.*)
path: ./phpmyadmin/phpmyadmin$1
# -
# alias: /pma
# path: ./phpmyadmin/phpmyadmin
# -
# alias: /pma/themes
# path: ./phpmyadmin/phpmyadmin/themes
it is also good to setup executing of that directory by php-fpm as it is usually the case for vagrant apache
directories:
avd_p60e0bzgan4a:
path: phpmyadmin/phpmyadmin/
options:
- Indexes
- FollowSymlinks
- MultiViews
allow_override:
- All
require:
- 'all granted'
custom_fragment: ''
files_match:
avdfm_5xnjfunw9aia:
path: \.php$
sethandler: 'proxy:fcgi://127.0.0.1:9000'
custom_fragment: ''
provider: filesmatch