Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Owain Jones
gliders-webserver
Commits
cf63374e
Commit
cf63374e
authored
9 years ago
by
Gliders User
Browse files
Options
Download
Plain Diff
Merge branch 'master' of gitlab.noc.soton.ac.uk:owanes/gliders-webserver
parents
648b2a99
abcddc50
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
7 deletions
+35
-7
deploy.sh
deploy.sh
+21
-0
gliders.nginx.conf
gliders.nginx.conf
+6
-6
install.sh
install.sh
+6
-1
php-d-fpm.ini
php-d-fpm.ini
+2
-0
No files found.
deploy.sh
View file @
cf63374e
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
gliders.nginx.conf
View file @
cf63374e
...
...
@@ -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
;
}
...
...
This diff is collapsed.
Click to expand it.
install.sh
View file @
cf63374e
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
php-d-fpm.ini
View file @
cf63374e
cgi.fix_pathinfo
=
0
date.timezone
=
'UTC'
apc.shm_size
=
256M
upload_max_filesize
=
8M
post_max_size
=
9M
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment