-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved ancillary config file to separate directory
- Loading branch information
1 parent
de28aa9
commit 70e40e1
Showing
5 changed files
with
36 additions
and
42 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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,35 @@ | ||
server { | ||
server_name learningapi.nss.team; | ||
access_log /var/log/nginx/api.log; | ||
|
||
location / { | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-NginX-Proxy true; | ||
|
||
include proxy_params; | ||
proxy_pass http://127.0.0.1:8000; | ||
} | ||
|
||
location /static/ { | ||
autoindex off; | ||
root /var/www/learning.nss.team/; | ||
} | ||
|
||
listen 443 ssl; # managed by Certbot | ||
ssl_certificate /etc/letsencrypt/live/learningapi.nss.team/fullchain.pem; # managed by Certbot | ||
ssl_certificate_key /etc/letsencrypt/live/learningapi.nss.team/privkey.pem; # managed by Certbot | ||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot | ||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot | ||
} | ||
|
||
|
||
server { | ||
if ($host = learningapi.nss.team) { | ||
return 301 https://$host$request_uri; | ||
} # managed by Certbot | ||
|
||
|
||
listen 80; | ||
server_name learningapi.nss.team; | ||
return 404; # managed by Certbot | ||
} |
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