Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions dev/vagrant-config/nginx/default
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ server {

server_name _;

access_log /vagrant/storage/logs/nginx-access.log;
error_log /vagrant/storage/logs/nginx-error.log;

location / {
try_files $uri $uri/ /index.php$is_args$args;
# Uncomment to enable naxsi on this location
Expand All @@ -29,4 +32,28 @@ server {
#location ~ /\.ht {
# deny all;
#}

location /phpmyadmin {
root /srv/;
index index.php;

location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /srv/;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 300;
}

location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /srv/;
}
}

location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}

}
1 change: 1 addition & 0 deletions dev/vagrant-config/scripts/finish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ echo "192.168.25.35 hmsdev"
echo ""
echo "Info: https://github.com/NottingHack/hms2/blob/master/README.md"
echo ""
echo "phpMyAdmin: https://hsmdev/phpmyadmin/"
echo "MySQL: username = root, password = root"
echo "kadmin: username = vagrant password = vagrant"
#echo ""
Expand Down
2 changes: 1 addition & 1 deletion dev/vagrant-config/scripts/kerberos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ chmod a+r /vagrant/storage/app/hms.keytab
# pecl install krb5 - this (still 2016) doesn't have kadm support.
mkdir /root/php-krb
cd /root/php-krb
wget http://pecl.php.net/get/krb5-1.1.0.tgz
wget --progress=bar:force http://pecl.php.net/get/krb5-1.1.0.tgz
tar zxf krb5-1.1.0.tgz
cd /root/php-krb/krb5-1.1.0
phpize
Expand Down
16 changes: 14 additions & 2 deletions dev/vagrant-config/scripts/php.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,20 @@ echo " "
debconf-set-selections <<< 'libssl1.0.0:amd64 libssl1.0.0/restart-services string ntp'

# removing php-pear php-dev as they rely on PHP5
apt-get install -y haveged php7.0-fpm php7.0-mysql php7.0-apcu php7.0-json php7.0-curl php-mbstring php7.0-xml php7.0-zip > /dev/null 2>&1
apt-get install -y haveged php7.0-fpm php7.0-mysql php7.0-apcu php7.0-json php7.0-curl php-mbstring php7.0-xml php7.0-zip php7.0-xdebug > /dev/null 2>&1

# set php-fpm to run as "vagrant" user
sed -i 's/user = www-data/user = vagrant/g' /etc/php/7.0/fpm/pool.d/www.conf
sed -i 's/group = www-data/group = vagrant/g' /etc/php/7.0/fpm/pool.d/www.conf
sed -i 's/group = www-data/group = vagrant/g' /etc/php/7.0/fpm/pool.d/www.conf
echo 'error_log = /vagrant/storage/logs/php_errors.log' >> /etc/php/7.0/fpm/php.ini
echo 'xdebug.remote_enable = on' >> /etc/php/7.0/fpm/conf.d/20-xdebug.ini
echo 'xdebug.remote_connect_back = on' >> /etc/php/7.0/fpm/conf.d/20-xdebug.ini
echo 'xdebug.remote_host = 192.168.35.22' >> /etc/php/7.0/fpm/conf.d/20-xdebug.ini

#phpmyadmin
cd /srv/
wget --progress=bar:force https://files.phpmyadmin.net/phpMyAdmin/4.6.4/phpMyAdmin-4.6.4-english.tar.gz
tar zxf phpMyAdmin-4.6.4-english.tar.gz
mv phpMyAdmin-4.6.4-english phpmyadmin
chown vagrant:vagrant -R phpmyadmin
cp phpmyadmin/config.sample.inc.php phpmyadmin/config.inc.php