From 05d9793258fed457aba611f95bb2e24b8ea8fc05 Mon Sep 17 00:00:00 2001 From: jberkleef Date: Thu, 28 May 2020 03:02:43 +0000 Subject: [PATCH] Added nginx config --- nginx-config-files/houtmarkt-app.conf | 16 ++++++++++++++++ readme.md | 18 ++++++++++-------- 2 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 nginx-config-files/houtmarkt-app.conf diff --git a/nginx-config-files/houtmarkt-app.conf b/nginx-config-files/houtmarkt-app.conf new file mode 100644 index 0000000..9632a8f --- /dev/null +++ b/nginx-config-files/houtmarkt-app.conf @@ -0,0 +1,16 @@ +server { + listen 80; + server_name _; + root /houtmarkt-jeremy/nginx-data/ + + location /static/ { + alias /houtmarkt-jeremy/nginx-data/staticfiles/; + # Never forget the fact that this little statement being root instead of alias caused us to lose more than a day troubleshooting + } + + location { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_pass http://127.0.0.1:8080/; + } +} \ No newline at end of file diff --git a/readme.md b/readme.md index c6516e2..3080683 100644 --- a/readme.md +++ b/readme.md @@ -4,11 +4,13 @@ Well the title says it all, really --- ## **Install Instructions** -> 1. Install python3, python3-devel and pip3 -> 2. Pip install django uwsgi -> 3. Git Clone this repo -> 4. Edit the paths in systemd-files/houtmarkt-uwsgi.service -> 5. Copy the service file to /etc/systemd/system/ -> 6. Create user www-houtmarkt and group www-data, add www-houtmarkt to www-data -> 7. ??? -> 8. Profit +> 1. Install python3, python3-devel pip3 and nginx +> 2. Move nginx-config-files/houtmarkt-app.conf to your nginx config.d or sites-available or whatever you use +> 3. Make Django pull the staticfiles into nginx-data/staticfiles +> 4. Pip install django uwsgi +> 5. Git Clone this repo +> 6. Edit the paths in systemd-files/houtmarkt-uwsgi.service +> 7. Copy the service file to /etc/systemd/system/ +> 8. Create user www-houtmarkt and group www-data, add www-houtmarkt to www-data +> 9. ??? +> 10. Profit