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
#!/bin/bash | |
# (The MIT License) | |
# | |
# Copyright (c) 2015 Jan Broer | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
# Install dependencies | |
# | |
# * checkinstall: package the .deb | |
# * libpcre3, libpcre3-dev: required for HTTP rewrite module | |
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module | |
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \ | |
mkdir -p ~/sources/ && \ | |
# Compile against OpenSSL to enable NPN |
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
server { | |
##DM - uncomment following line for domain mapping | |
#listen 80 default_server; | |
server_name example.com *.example.com ; | |
##DM - uncomment following line for domain mapping | |
#server_name_in_redirect off; | |
access_log /var/log/nginx/example.com.access.log; | |
error_log /var/log/nginx/example.com.error.log; |
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
server { | |
##DM - uncomment following line for domain mapping | |
#listen 80 default_server; | |
server_name example.com *.example.com ; | |
##DM - uncomment following line for domain mapping | |
#server_name_in_redirect off; | |
access_log /var/log/nginx/example.com.access.log; | |
error_log /var/log/nginx/example.com.error.log; |
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
# Adjust this to include any other necessary files. | |
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { | |
expires 24h; | |
log_not_found off; | |
try_files $uri $uri/ @production; | |
} | |
location @production { | |
resolver 1.1.1.1; | |
proxy_pass http://{replace-with.domain.com}/$uri; |