Commit e39883a9 authored by Daniel Stan's avatar Daniel Stan

nginx sur cupcake

parent 6a294a49
resolver 213.186.33.99;
server {
listen 80 default_server; ## listen for ipv4; this line is default and implied
listen [::]:80 default_server ipv6only=on; ## listen for ipv6
root /var/www/tudo.re;
# Make site accessible from http://localhost/
server_name _;
location @tokugel {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
# try_files $uri $uri/ /index.html;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
proxy_redirect off;
proxy_set_header Host $host;
proxy_pass http://kugel.tudo.re;
}
location '/.well-known/acme-challenge' {
default_type "text/plain";
alias /tmp/letsencrypt-auto/.well-known/acme-challenge;
try_files $uri @tokugel;
}
location / {
rewrite ^(.*)$ https://$host$1 permanent;
}
}
server {
listen 443 default_server;
listen [::]:443 default_server ipv6only=on;
server_name _;
root /var/www/tudo.re;
index index.html index.htm;
ssl on;
# todo: replace /tmp/ by /etc/letsencrypt/live
ssl_certificate /tmp/www.tudo.re/fullchain.pem;
ssl_certificate_key /tmp/www.tudo.re/privkey.pem;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
# try_files $uri $uri/ /index.html;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
proxy_redirect off;
proxy_set_header Host $host;
proxy_pass https://kugel.tudo.re;
}
}
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