Commit 06d59c79 authored by Klaus-Uwe Mitterer's avatar Klaus-Uwe Mitterer

Add sample nginx config

parent 0aa1f146
server {
listen 80;
listen 443 ssl http2;
server_name gps.example.com;
ssl_certificate /etc/letsencrypt/live/gps.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/gps.example.com/privkey.pem;
include snippets/ssl.conf;
if ($ssl_protocol = "") {
rewrite ^ https://$server_name$request_uri? permanent;
}
location /endpoint.php {
proxy_pass http://127.0.0.1:6957/endpoint;
}
location /endpoint {
proxy_pass http://127.0.0.1:6957/endpoint;
}
location /lib/ {
root /opt/pygps/;
}
location / {
auth_basic "GPS Tracker";
auth_basic_user_file "/etc/nginx/auth/gps";
proxy_pass http://127.0.0.1:6957/;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
}
location /.well-known/ {
root /opt/pygps/;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment