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
6e90016d
Commit
6e90016d
authored
9 years ago
by
root
Browse files
Options
Download
Email Patches
Plain Diff
added more packages to install
parent
5af4311d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
113 additions
and
43 deletions
+113
-43
apc.nginx.conf
apc.nginx.conf
+25
-0
gliders.nginx.conf
gliders.nginx.conf
+70
-40
install.sh
install.sh
+18
-3
No files found.
apc.nginx.conf
0 → 100644
View file @
6e90016d
server
{
listen
80
;
listen
8080
;
server_name
apc
.
dev
.
gliders
.
vm
;
root
/
home
/
gliders
/
code
/
APC
-
Admin
;
error_log
/
var
/
log
/
nginx
/
apc
.
error
.
log
;
access_log
/
var
/
log
/
nginx
/
apc
.
access
.
log
;
location
/ {
try_files
$
uri
@
apc
;
}
# pass the PHP scripts to FastCGI server from upstream phpfcgi
location
@
apc
{
fastcgi_pass
phpfcgi
;
fastcgi_index
index
.
php
;
fastcgi_buffers
256
4
k
;
include
fastcgi_params
;
fastcgi_param
SCRIPT_FILENAME
$
document_root
/
index
.
php
;
fastcgi_param
SCRIPT_NAME
index
.
php
;
fastcgi_param
HTTPS
off
;
}
}
This diff is collapsed.
Click to expand it.
gliders.nginx.conf
View file @
6e90016d
# https://www.nginx.com/resources/wiki/start/topics/recipes/symfony/
# NOTE: This makes any .php file other than app, app_dev and config.php
# downloadable. If you want one to run, add it to the "pass the PHP scripts to
# upstream FCGI" location section below. Be careful adding
PHP
files with
# upstream FCGI" location section below. Be careful adding files with
# sensitive data like passwords inside them.
map
$
host
$
symfony_root
{
default
/
home
/
gliders
/
code
/
gliders
-
website
;
# default /home/gliders/code/gliders-website;
default
/
var
/
gliders
/
www
;
}
map
$
host
$
symfony_root_dev
{
default
/
var
/
gliders
/
www_dev
;
}
server
{
listen
80
;
listen
8080
;
server_name
gliders
.
vm
dev
.
gliders
.
vm
;
server_name
gliders
.
vm
;
root
$
symfony_root
/
web
;
error_log
/
var
/
log
/
nginx
/
gliders
.
error
.
log
;
access_log
/
var
/
log
/
nginx
/
gliders
.
access
.
log
;
# Enable compression. Very helpful when we're getting stuff like
# large amounts of vehicle tracks in JSON form!
gzip
on
;
gzip_types
text
/
plain
application
/
xml
text
/
html
text
/
css
application
/
json
application
/
x
-
javascript
text
/
xml
text
/
javascript
;
# strip app.php/ prefix if it is present
rewrite
^/
app
\.
php
/?(.*)$ /$
1
permanent
;
location
/ {
index
app
.
php
;
try_files
$
uri
@
rewriteapp
;
}
location
~ ^/(
images
|
fonts
|
css
|
js
) {
access_log
off
;
error_log
off
;
try_files
$
uri
=
404
;
expires
1
y
;
add_header
Cache
-
Control
"public"
;
}
location
/
static
/
logs
{
alias
/
var
/
gliders
/
logs
;
}
location
@
rewriteapp
{
rewrite
^(.*)$ /
app
.
php
/$
1
last
;
}
# pass the PHP scripts to FastCGI server from upstream phpfcgi
location
~ ^/(
app
|
app_dev
|
config
)\.
php
(/|$) {
fastcgi_pass
phpfcgi
;
include
fastcgi_params
;
fastcgi_split_path_info
^(.+\.
php
)(/.*)$;
fastcgi_param
SCRIPT_FILENAME
$
symfony_root
/
web
$
fastcgi_script_name
;
fastcgi_param
HTTPS
off
;
}
}
server
{
listen
80
;
server_name
dev
.
gliders
.
vm
;
root
$
symfony_root_dev
/
web
;
error_log
/
var
/
log
/
nginx
/
dev
.
gliders
.
error
.
log
;
access_log
/
var
/
log
/
nginx
/
dev
.
gliders
.
access
.
log
;
# Enable compression. Very helpful when we're getting stuff like
# large amounts of vehicle tracks in JSON form!
gzip
on
;
gzip_types
text
/
plain
application
/
xml
text
/
html
text
/
css
application
/
json
application
/
x
-
javascript
text
/
xml
text
/
javascript
;
# strip app.php/ prefix if it is present
rewrite
^/
app_dev
\.
php
/?(.*)$ /$
1
permanent
;
location
/ {
index
app_dev
.
php
;
try_files
$
uri
@
rewriteapp
;
}
location
~ ^/(
images
|
fonts
|
css
|
js
) {
access_log
off
;
error_log
off
;
try_files
$
uri
=
404
;
expires
1
y
;
add_header
Cache
-
Control
"public"
;
}
location
/
static
/
logs
{
alias
/
var
/
gliders
/
logs
;
}
...
...
@@ -39,43 +104,8 @@ server {
fastcgi_pass
phpfcgi
;
include
fastcgi_params
;
fastcgi_split_path_info
^(.+\.
php
)(/.*)$;
fastcgi_param
SCRIPT_FILENAME
$
symfony_root
/
web
$
fastcgi_script_name
;
fastcgi_param
SCRIPT_FILENAME
$
symfony_root
_dev
/
web
$
fastcgi_script_name
;
fastcgi_param
HTTPS
off
;
}
}
# We don't yet have an SSL cert (not like a VM on my own machine needs one...)
# server {
# listen 443;
#
# server_name gliders.vm *.gliders.vm;
# root /home/gliders/code/gliders-website/web;
#
# ssl on;
# ssl_certificate /etc/ssl/certs/symfony2.crt;
# ssl_certificate_key /etc/ssl/private/symfony2.key;
#
# error_log /var/log/nginx/symfony2.error.log;
# access_log /var/log/nginx/symfony2.access.log;
#
# # strip app.php/ prefix if it is present
# rewrite ^/app\.php/?(.*)$ /$1 permanent;
#
# location / {
# index app.php;
# try_files $uri @rewriteapp;
# }
#
# location @rewriteapp {
# rewrite ^(.*)$ /app.php/$1 last;
# }
#
# # pass the PHP scripts to FastCGI server from upstream phpfcgi
# location ~ ^/(app|app_dev|config)\.php(/|$) {
# fastcgi_pass phpfcgi;
# fastcgi_split_path_info ^(.+\.php)(/.*)$;
# include fastcgi_params;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# fastcgi_param HTTPS on;
# }
# }
This diff is collapsed.
Click to expand it.
install.sh
View file @
6e90016d
...
...
@@ -17,7 +17,7 @@ yum check-update
yum update
# Install needed tools
yum
install
git rsync wget vim ansible tmux htop iotop dstat lsof
yum
install
git rsync wget vim ansible tmux htop iotop dstat lsof
telnet
# And inotify tools
yum
install
inotify-tools incron
...
...
@@ -90,8 +90,23 @@ virtualenv /home/gliders/pythonenv
cd
/home/gliders/code
ssh-keygen
# Add contents of /home/gliders/.ssh/id_rsa.pub to GitLab, then:
git clone git@gitlab.noc.soton.ac.uk:allore/Website-Scripts.git
git clone git@gitlab.noc.soton.ac.uk:owanes/gliders-testwebsite.git
git clone git@gitlab.noc.soton.ac.uk:owanes/gliders-tools.git
git clone git@gitlab.noc.soton.ac.uk:owanes/gliders-website.git
# Install the gliders DB and parser python libraries,
# then fetch all our log files and parse them!
cd
gliders-tools
python setup.py
install
echo
"please enter your mysql root user password when prompted (three times)"
mysql
-u
root
-p
< new_schema.sql
echo
"CREATE USER 'gliders'@'%' IDENTIFIED BY PASSWORD 'gliders9876';"
| mysql
-u
root
-p
echo
"GRANT ALL ON gliders.* TO 'gliders'@'%';"
| mysql
-u
root
-p
cd
bin
./migrate_data.sh
cd
/home/gliders/code/gliders-website
./bin/deploy.sh
# Restart (needed to get firewall to open ports for web, kernel might be
# updated etc.)
...
...
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