aboutsummaryrefslogtreecommitdiff
path: root/ideez_nginx.conf
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-10-09 16:54:52 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-10-12 12:01:51 +0200
commit2d498443031c1831925d9ba91f8795b7f994677f (patch)
tree5952a1ae36d41ce20a8257f34c7f9487131203db /ideez_nginx.conf
parent1e0ae41f1ec06379a6602613612c085ad053c0fa (diff)
Split server code and http code
Create multiple instances of Ideez by running NewIdeez(), after creating they can be added to the Ideezes slice to manage them. NewIdeez() imports the data and registers the routes. main.go has the code for managing the instances and server.go has the code coupled to a single instance. For eg. main.go has the code which checks files with .data extension in data directory, and imports servers on startup. - Add import functionality - Add nginx configuration - Add style and copy animation - Check for https with "X-Forwarded-Proto" - Change assets and templates to reflect the new id change - Change port to 15118 - Add Id field to Idea - Do not check for duplicate titles anymore - Extract ideez_servers into const variable - Extract documentation in doc.go - Rename Server -> Ideez - Rename t_idea/ -> templates/ - Fix cancel not working with form by using javascript instead - Set logger prefix in different contexts
Diffstat (limited to 'ideez_nginx.conf')
-rw-r--r--ideez_nginx.conf25
1 files changed, 25 insertions, 0 deletions
diff --git a/ideez_nginx.conf b/ideez_nginx.conf
new file mode 100644
index 0000000..b22eb58
--- /dev/null
+++ b/ideez_nginx.conf
@@ -0,0 +1,25 @@
+server {
+ server_name ideez.website.com;
+ location / {
+ proxy_pass http://127.0.0.1:15118;
+ proxy_set_header Host $host;
+ proxy_set_header X-Forwarded-Proto $scheme;
+ }
+
+
+ listen 443 ssl;
+ ssl_certificate /etc/letsencrypt/live/ideez.website.com/fullchain.pem;
+ ssl_certificate_key /etc/letsencrypt/live/ideez.website.com/privkey.pem;
+ include /etc/letsencrypt/options-ssl-nginx.conf;
+ ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
+
+}
+
+server {
+ if ($host = ideez.website.com) {
+ return 301 https://$host$request_uri;
+ }
+ server_name ideez.website.com;
+ listen 80;
+ return 404;
+}