Skip to content

Commit

Permalink
add microblog.pub
Browse files Browse the repository at this point in the history
  • Loading branch information
DejavuMoe committed May 10, 2023
1 parent b7d655e commit e367748
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions microblog.pub/microblog.pub.nginx
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit e367748

Please sign in to comment.