diff --git a/elasticsearch.nginx.conf b/elasticsearch.nginx.conf new file mode 100644 index 0000000000000000000000000000000000000000..6deed80a87ff7af188ce779b610968f5c730bd92 --- /dev/null +++ b/elasticsearch.nginx.conf @@ -0,0 +1,9 @@ +server { + listen 80; + listen 8080; + + server_name es.dev.gliders.vm; + location / { + proxy_pass http://127.0.0.1:9200; + } +} diff --git a/elasticsearch.repo b/elasticsearch.repo new file mode 100644 index 0000000000000000000000000000000000000000..e9d28a6157a2cc46a1ffff4d0ff90e961b2bd771 --- /dev/null +++ b/elasticsearch.repo @@ -0,0 +1,6 @@ +[elasticsearch-2.x] +name=Elasticsearch repository for 2.x packages +baseurl=http://packages.elastic.co/elasticsearch/2.x/centos +gpgcheck=1 +gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch +enabled=1 diff --git a/gliders.nginx.conf b/gliders.nginx.conf index 681e7b2548481ae25310749d15f4fbf4648e917f..e74f787962ae2dc62646c0adbabc3d5aa83a9bf0 100644 --- a/gliders.nginx.conf +++ b/gliders.nginx.conf @@ -8,15 +8,11 @@ map $host $symfony_root { default /home/gliders/code/gliders-website; } -upstream phpfcgi { - server unix:/var/run/php5-fpm.sock; #for PHP-FPM running on UNIX socket -} - server { listen 80; listen 8080; - server_name gliders.vm *.gliders.vm; + server_name gliders.vm dev.gliders.vm; root $symfony_root/web; error_log /var/log/nginx/gliders.error.log; @@ -26,12 +22,12 @@ server { rewrite ^/app\.php/?(.*)$ /$1 permanent; location / { - index app.php; + index app_dev.php; try_files $uri @rewriteapp; } location @rewriteapp { - rewrite ^(.*)$ /app.php/$1 last; + rewrite ^(.*)$ /app_dev.php/$1 last; } # pass the PHP scripts to FastCGI server from upstream phpfcgi @@ -78,4 +74,4 @@ server { # fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # fastcgi_param HTTPS on; # } -# } \ No newline at end of file +# } diff --git a/install.sh b/install.sh index e03bc3c1d35630ad7e1215230b4b7aa7969fd6f5..6bbd5c9471c7bc3dcacf7c44bfa922fc0682cf95 100644 --- a/install.sh +++ b/install.sh @@ -30,6 +30,7 @@ yum install python-inotify numpy python-matplotlib python-virtualenv python -m easy_install pip pip install pandas pip install css-html-js-minify +pip install bcrypt # Install (& configure) sendmail yum install sendmail sendmail-cf m4 @@ -94,4 +95,4 @@ git clone git@gitlab.noc.soton.ac.uk:owanes/gliders-testwebsite.git # Restart (needed to get firewall to open ports for web, kernel might be # updated etc.) -reboot \ No newline at end of file +reboot diff --git a/nginx.conf b/nginx.conf index 5a4af8d7bed9b3cd3605b9d28a04736d42ed10f2..3f9b19e9013c603b4714b76d36073ca08ea8705a 100644 --- a/nginx.conf +++ b/nginx.conf @@ -33,6 +33,11 @@ http { include /etc/nginx/mime.types; default_type application/octet-stream; + charset utf-8; + + upstream phpfcgi { + server unix:/var/run/php5-fpm.sock; #for PHP-FPM running on UNIX socket + } # Load modular configuration files from the /etc/nginx/conf.d directory. # See http://nginx.org/en/docs/ngx_core_module.html#include diff --git a/phpci.nginx.conf b/phpci.nginx.conf new file mode 100644 index 0000000000000000000000000000000000000000..a4cd0e1bbd5442572d7bce36ea55f6c625c8e17e --- /dev/null +++ b/phpci.nginx.conf @@ -0,0 +1,67 @@ +# 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 +# sensitive data like passwords inside them. + +server { + listen 80; + listen 8080; + + server_name phpci.dev.gliders.vm; + root /home/gliders/code/phpci/public; + + error_log /var/log/nginx/phpci.error.log; + access_log /var/log/nginx/phpci.access.log; + + location / { + try_files $uri @phpci; + } + + # pass the PHP scripts to FastCGI server from upstream phpfcgi + location @phpci { + fastcgi_pass phpfcgi; + fastcgi_index index.php; + fastcgi_buffers 256 4k; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root/index.php; + fastcgi_param SCRIPT_NAME index.php; + 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; +# } +# }