summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDejavu Moe <[email protected]>2023-05-10 18:31:48 +0800
committerDejavu Moe <[email protected]>2023-05-10 18:31:48 +0800
commite367748cab4e82ccaf864ce77553c7f512bd24f2 (patch)
tree2eff696a580a014c4d61eba433a454f50bae0f73
parentb7d655ec5a133c78037a728781bb8875174a87a7 (diff)
downloadself-hosted-e367748cab4e82ccaf864ce77553c7f512bd24f2.tar.gz
self-hosted-e367748cab4e82ccaf864ce77553c7f512bd24f2.zip
add microblog.pub
-rw-r--r--microblog.pub/microblog.pub.nginx50
1 files changed, 50 insertions, 0 deletions
diff --git a/microblog.pub/microblog.pub.nginx b/microblog.pub/microblog.pub.nginx
new file mode 100644
index 0000000..e8b3134
--- /dev/null
+++ b/microblog.pub/microblog.pub.nginx
@@ -0,0 +1,50 @@
+server {
+ listen 80;
+ listen [::]:80;
+ server_name yourdomain.com;
+ return 301 https://$server_name$request_uri;
+}
+
+server {
+ listen 443 ssl http2;
+ listen [::]:443 ssl http2;
+ server_name yourdomain.com;
+
+ ssl_protocols TLSv1.2 TLSv1.3;
+ ssl_ciphers HIGH:!MEDIUM:!LOW:!aNULL:!NULL:!SHA;
+ ssl_prefer_server_ciphers on;
+ ssl_session_cache shared:SSL:10m;
+ ssl_session_tickets off;
+
+ # Uncomment these lines once you acquire a certificate:
+ ssl_certificate /etc/nginx/cert/yourdomain.com.pem;
+ ssl_certificate_key /etc/nginx/cert/yourdomain.com.key;
+
+ client_max_body_size 4G;
+
+ location / {
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection $connection_upgrade;
+ proxy_redirect off;
+ proxy_buffering off;
+ proxy_pass http://127.0.0.1:8762;
+ }
+
+ location /static {
+ # path for static files
+ rewrite ^/static/(.*) /$1 break;
+ root /home/dejavu/container/yourdomain.com/app/static/;
+ expires 1y;
+ }
+
+ access_log /var/log/nginx/yourdomain.com.access.log;
+ error_log /var/log/nginx/yourdomain.com.error.log;
+}
+
+map $http_upgrade $connection_upgrade {
+ default upgrade;
+ '' close;
+} \ No newline at end of file