-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
46 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
# Configure the Nginx server | ||
|
||
echo "Removing default site configuration for Nginx" | ||
rm /etc/nginx/sites-enabled/default | ||
|
||
echo "Seeding Nginx site configuration for blockbuster-server" | ||
cd /etc/nginx/sites-enabled | ||
|
||
if [ -e "blockbuster-server" ] | ||
then | ||
echo "NO CHANGE - blockbuster-server site file already present" | ||
else | ||
cp /vagrant/provision/nginx/blockbuster-server /etc/nginx/sites-available/ | ||
echo "Copying blockbuster-server site config into sites-available" | ||
ln -s /etc/nginx/sites-available/blockbuster-server /etc/nginx/sites-enabled/blockbuster-server | ||
fi | ||
|
||
echo "Restarting Nginx" | ||
service nginx reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
server { | ||
|
||
listen 80; | ||
server_name localhost; | ||
|
||
access_log /var/log/nginx/blockbuster.access.log; | ||
|
||
location /app { | ||
alias /var/www/blockbuster-app/app; | ||
} | ||
|
||
location / { | ||
|
||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_http_version 1.1; | ||
proxy_set_header Connection ""; | ||
proxy_pass http://localhost:8000; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters