Commit cf63374e authored by Gliders User's avatar Gliders User
Browse files

Merge branch 'master' of gitlab.noc.soton.ac.uk:owanes/gliders-webserver

parents 648b2a99 abcddc50
......@@ -80,6 +80,27 @@ echo "export BOWERPHP_TOKEN=$GITHUB_API_KEY" >> ~/.bashrc
composer config -g github-oauth.github.com $GITHUB_API_KEY
export BOWERPHP_TOKEN=$GITHUB_API_KEY
# Setup memcache and imagick
cd /home/gliders/code
git clone 'https://github.com/php-memcached-dev/php-memcached.git'
cd php-memcached
phpize
./configure
make && sudo make install
echo 'extension=memcached.so' >> memcached.ini
sudo cp memcached.ini /etc/php.d/
cd /home/gliders/code
git clone 'https://github.com/mkoppanen/imagick.git'
cd imagick
phpize
./configure
make
sudo make install
echo 'extension=imagick.so' | sudo tee -a /etc/php.d/imagick.ini
sudo systemctl restart php-fpm
# Deploy the website
cd /home/gliders/code/gliders-website
sh bin/deploy.sh /var/gliders/www_dev dev
......
......@@ -61,12 +61,6 @@ server {
add_header Cache-Control "public";
}
location ~ ^/images/vehicles/(?P<vehicle_type>[a-zA-Z0-9]+)_(?P<vehicle_name>[a-zA-Z0-9]+)\.(png|jpg)$ {
access_log off;
error_log off;
try_files $uri images/vehicles/$vehicle_name.png =404;
}
location /static/logs {
alias /var/gliders/logs;
}
......@@ -79,6 +73,12 @@ server {
alias /var/gliders/static;
}
location /static/images {
access_log off;
error_log off;
alias /var/gliders/static/images;
}
location @rewriteapp {
rewrite ^(.*)$ /${symfonyfile}.php/$1 last;
}
......
......@@ -174,9 +174,14 @@ echo '::1 dev.gliders.localhost gliders.localhost' >> /etc/hosts
# cp hhvm.service /etc/systemd/system/
# systemctl enable hhvm
# Install memcached
yum install -y memcached memcached-devel libmemcached-devel
systemctl enable memcached
systemctl start memcached
# Create gliders dirs and allow the webserver to read/write to them
# (Mostly this sets up SELinux rules)
mkdir -p /var/gliders/www_dev /var/gliders/www /var/gliders/incoming /var/gliders/logs /var/gliders/static /var/gliders/daemon/logs
mkdir -p /var/gliders/www_dev /var/gliders/www /var/gliders/incoming /var/gliders/logs /var/gliders/static /var/gliders/daemon/logs /var/gliders/www_tmp
chown -R gliders /var/gliders
setsebool -P httpd_can_network_connect 1
chcon -R -t httpd_sys_rw_content_t /usr/share/nginx
......
cgi.fix_pathinfo = 0
date.timezone = 'UTC'
apc.shm_size = 256M
upload_max_filesize = 8M
post_max_size = 9M
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment