mirror of
https://github.com/Forceu/Gokapi.git
synced 2025-12-30 21:39:36 -06:00
41 lines
853 B
Nginx Configuration File
41 lines
853 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
ssl_certificate /your/certificate/fullchain.pem;
|
|
ssl_certificate_key /your/certificate/privkey.pem;
|
|
|
|
index index.html index.php index.htm;
|
|
|
|
client_max_body_size 500M;
|
|
client_body_buffer_size 128k;
|
|
|
|
disable_symlinks off;
|
|
|
|
|
|
server_name your.server.url;
|
|
|
|
location / {
|
|
proxy_set_header X-Forwarded-Host $http_cf_connecting_ip;
|
|
proxy_set_header Host $http_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 http;
|
|
proxy_pass http://127.0.0.1:53842;
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( $scheme = http ) {
|
|
return 301 https://$server_name$request_uri;
|
|
}
|
|
|
|
|
|
location ~ /\.ht {
|
|
deny all;
|
|
}
|
|
}
|
|
|