Commit 7930c5b1 authored by Daniel Baur's avatar Daniel Baur

fixed nginx config, fixed postgres remote listening

parent 0f841dc6
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
upstream backend_hosts {
{% for id, backend in backends.iteritems() %}
server {{ backend.address }}:2368;
{% endfor %}
}
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.html index.htm;
upstream ghost {
{% for id, backend in backends.iteritems() %}
server {{ backend.address }}:2368
{% endfor %}
}
# Make site accessible from http://localhost/
listen 80;
server_name localhost;
location / {
proxy_pass http://ghost;
proxy_pass http://backend_hosts;
}
}
\ No newline at end of file
......@@ -6,4 +6,10 @@ ctx logger debug "${COMMAND}"
sudo apt-get update
sudo apt-get -y install postgresql
sudo echo "host all all 0.0.0.0/0 trust" | sudo tee --append /etc/postgresql/9.3/main/pg_hba.conf
sudo sed -i "/listen_addresses/c\listen_addresses='*'" /etc/postgresql/9.3/main/postgresql.conf
sudo -H -u postgres bash -c '/usr/bin/createdb ghost_testing -O postgres'
sudo service postgresql restart
ctx logger info "Installed postgre"
\ No newline at end of file
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