-
Notifications
You must be signed in to change notification settings - Fork 108
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
2 changed files
with
24 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
server { | ||
root /var/www; | ||
index index.html index.htm; | ||
root /var/www; | ||
index index.html index.htm; | ||
|
||
# Make site accessible from http://localhost/ | ||
server_name localhost; | ||
# Make site accessible from http://localhost/ | ||
server_name localhost; | ||
|
||
# Add 1 day expires header for static assets | ||
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { | ||
expires 1d; | ||
} | ||
# Add 1 day expires header for static assets | ||
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { | ||
expires 1d; | ||
} | ||
|
||
location / { | ||
# First attempt to serve request as file, then | ||
# as directory, then fall back to redirecting to index.html | ||
try_files $uri $uri/ @root; | ||
} | ||
location / { | ||
# First attempt to serve request as file, then | ||
# as directory, then fall back to redirecting to index.html | ||
try_files $uri $uri/ @root; | ||
} | ||
|
||
# If nginx can't find a file, fallback to the homepage. | ||
location @root { | ||
rewrite .* / redirect; | ||
} | ||
|
||
# If nginx can't find a file, fallback to the homepage. | ||
location @root { | ||
rewrite .* / redirect; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
server { | ||
listen 443; | ||
listen 443; | ||
|
||
root /var/www; | ||
index index.html index.htm; | ||
root /var/www; | ||
index index.html index.htm; | ||
|
||
ssl on; | ||
ssl_certificate /etc/nginx/ssl/server.crt; | ||
ssl_certificate_key /etc/nginx/ssl/server.key; | ||
ssl on; | ||
ssl_certificate /etc/nginx/ssl/server.crt; | ||
ssl_certificate_key /etc/nginx/ssl/server.key; | ||
} |