Update nginx.conf for SSL and add gitea app.ini file
This commit is contained in:
@@ -7,15 +7,22 @@ events {
|
||||
|
||||
http {
|
||||
server {
|
||||
listen 8080;
|
||||
listen 80;
|
||||
listen 443 ssl;
|
||||
|
||||
include mime.types;
|
||||
charset utf-8;
|
||||
default_type text/html;
|
||||
|
||||
ssl_certificate /var/www/certs/miti.sh/fullchain.pem;
|
||||
ssl_certificate_key /var/www/certs/miti.sh/privkey.pem;
|
||||
|
||||
location ^~ /.well-known/acme-challenge {
|
||||
alias /var/www/dehydrated;
|
||||
}
|
||||
|
||||
try_files $uri $uri/ $uri.html =404;
|
||||
|
||||
# return `/posts/index.html` from `/posts`
|
||||
location = /posts {
|
||||
rewrite ^ /posts/ break;
|
||||
}
|
||||
@@ -30,4 +37,32 @@ http {
|
||||
alias css;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name git.miti.sh;
|
||||
|
||||
location ^~ /.well-known/acme-challenge {
|
||||
alias /var/www/dehydrated;
|
||||
}
|
||||
|
||||
location / {
|
||||
client_max_body_size 1024M;
|
||||
proxy_pass http://localhost:3000;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
server_name apps.miti.sh;
|
||||
|
||||
location ^~ /.well-known/acme-challenge {
|
||||
alias /var/www/dehydrated;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user