-
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.
Removed obsolete method that was never implemented
- Loading branch information
1 parent
e5e85fc
commit 6ed6fd1
Showing
2 changed files
with
35 additions
and
14 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
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 | ||
} |