<commit_before>
# Redirect all HTTP trafic to HTTPS

server {
    listen 80;
    listen [::]:80;

    server_name tapcrate.com www.tapcrate.com api.tapcrate.com www.api.tapcrate.com static.tapcrate.com www.static.tapcrate.com beta.tapcrate.com www.beta.tapcrate.com;

    location ^~ /.well-known/acme-challenge/ {
        default_type "text/plain";
        root /tmp/letsencrypt-auto/;
    }

    location = /.well-known/acme-challenge/ {
        return 404;
    }

    location / {
        return 301 https://$server_name$request_uri;
    }
}

server {

    listen 443 ssl http2 default_server;
    listen [::]:443 ssl http2 default_server;

    include snippets/ssl-tapcrate.com.conf;
    include snippets/ssl-params.conf;

    server_name tapcrate.com www.tapcrate.com;

    root /var/www/html;
    index index.php index.html;

    location / {
        try_files $uri $uri/ =404;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        include snippets/gzip.conf;
        fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    }

    location ~ /\.ht {
        deny all;
    }
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    include snippets/ssl-api.tapcrate.com.conf;
    include snippets/ssl-params.conf;

    root /home/hakon/tapcrate-api;

    server_name api.tapcrate.com www.api.tapcrate.com;<commit_msg>change where php code is located<commit_after>
# Redirect all HTTP trafic to HTTPS

server {
    listen 80;
    listen [::]:80;

    server_name tapcrate.com www.tapcrate.com api.tapcrate.com www.api.tapcrate.com static.tapcrate.com www.static.tapcrate.com beta.tapcrate.com www.beta.tapcrate.com;

    location ^~ /.well-known/acme-challenge/ {
        default_type "text/plain";
        root /tmp/letsencrypt-auto/;
    }

    location = /.well-known/acme-challenge/ {
        return 404;
    }

    location / {
        return 301 https://$server_name$request_uri;
    }
}

server {

    listen 443 ssl http2 default_server;
    listen [::]:443 ssl http2 default_server;

    include snippets/ssl-tapcrate.com.conf;
    include snippets/ssl-params.conf;

    server_name tapcrate.com www.tapcrate.com;

    root /home/hakon/tapcrate-web;
    index index.php index.html;

    location / {
        try_files $uri $uri/ =404;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        include snippets/gzip.conf;
        fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    }

    location ~ /\.ht {
        deny all;
    }
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    include snippets/ssl-api.tapcrate.com.conf;
    include snippets/ssl-params.conf;

    root /home/hakon/tapcrate-api;

    server_name api.tapcrate.com www.api.tapcrate.com;
{'fraction_non_alphanumeric': 0.11972343522561864, 'fraction_numerical': 0.022561863173216887, 'mean_word_length': 2.364749082007344, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 13, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2251197', 'n_tokens_mistral': 1073, 'n_tokens_neox': 978, 'n_words': 190}