I can't add domains to virtual host

I have a virtual host for a wiki site but I have problems. I have two domains but certbot won't add any others. What is wrong?

This is the virtual host code:

server {
    root /var/www/wikifamily;
    index index.php;

    server_name f0xwikis.rfx.fi
            www.f0xwikis.rfx.fi
            foxwikis.rfx.fi
            www.foxwikis.rfx.fi;

      location ~* \.php$ {
             fastcgi_pass unix:/run/php/php7.3-fpm.sock;
             include         fastcgi_params;
             fastcgi_param   SCRIPT_FILENAME    $document_root$fastcgi_script_name;
             fastcgi_param   SCRIPT_NAME        $fastcgi_script_name;
      }

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/r3df0x.com-0001/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/r3df0x.com-0001/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


}
server {
    if ($host = www.f0xwikis.rfx.fi) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


if ($host = f0xwikis.rfx.fi) {
    return 301 https://$host$request_uri;
} # managed by Certbot


    listen 80;

    server_name f0xwikis.rfx.fi
            www.f0xwikis.rfx.fi
            foxwikis.rfx.fi
            www.foxwikis.rfx.fi;
return 404; # managed by Certbot

}

This is the code I use in the certbot script for the command:

certbot --nginx\
    -d foxwikis.rfx.fi\
    -d www.foxwikis.rfx.fi\
    -d f0xwikis.rfx.fi\
    -d www.f0xwikis.rfx.fi\
    -d r3df0x.com\
    -d www.r3df0x.com\
    -d analytics.r3df0x.com\
    -d mail.dns.blacklist.r3df0x.com\
    -d cccrwiki.r3df0x.com\
    -d www.cccrwiki.r3df0x.com\
    -d coc.r3df0x.com\
    -d code-of-conduct.r3df0x.com\
    -d codeofconduct.r3df0x.com\
    -d conservativesjw.r3df0x.com\
    -d global.r3df0x.com\
    -d guns.r3df0x.com\
    -d i.r3df0x.com\
    -d metawiki.r3df0x.com\
    -d www.metawiki.r3df0x.com\
    -d opennic.r3df0x.com\
    -d www.opennic.r3df0x.com\
    -d resources.r3df0x.com\
    -d shitlordsinaction.r3df0x.com\
    -d sturmovik.r3df0x.com\
    -d www.sturmovik.r3df0x.com\
    -d template.r3df0x.com\
    -d thesexynerd.r3df0x.com\
    -d cccrwiki.rfx.fi\
    -d www.cccrwiki.rfx.fi\
    -d metawiki.rfx.fi\
    -d www.metawiki.rfx.fi\
    -d opennic.rfx.fi\
    -d www.opennic.rfx.fi\
    -d sturmovik.rfx.fi\
    -d www.sturmovik.rfx.fi\
    -d voynawiki.rfx.fi\
    -d www.voynawiki.rfx.fi\
    -d rfx.fi\
    -d www.rfx.fi\

This is the page: https://www.f0xwikis.rfx.fi/

I get a "not secure" notice on Chrome even though it says the cert is valid and the domains that use o instead of 0 are both invalid.

This is the error:

(E)xpand/(C)ancel: e
Renewing an existing certificate for foxwikis.rfx.fi and 38 more domains
Performing the following challenges:
http-01 challenge for foxwikis.rfx.fi
http-01 challenge for www.foxwikis.rfx.fi
Waiting for verification...
Challenge failed for domain foxwikis.rfx.fi
Challenge failed for domain www.foxwikis.rfx.fi
http-01 challenge for foxwikis.rfx.fi
http-01 challenge for www.foxwikis.rfx.fi
Cleaning up challenges
Some challenges have failed.

IMPORTANT NOTES:
- The following errors were reported by the server:

Domain: foxwikis.rfx.fi
Type:   unauthorized
Detail: Invalid response from
http://foxwikis.rfx.fi/.well-known/acme-challenge/MW0nZZWZeLW1CLLS6v5rlXWUS5CAnSTMFe9-oJe9tMY
[192.241.132.174]: "<html>\r\n<head><title>404 Not
Found</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>404
Not Found</h1></center>\r\n<hr><center>"

Domain: www.foxwikis.rfx.fi
Type:   unauthorized
Detail: Invalid response from
http://www.foxwikis.rfx.fi/.well-known/acme-challenge/m5GkdHkr6W0lFn36nVlN7fCFoSOJuwrCfne8wc4himU
[192.241.132.174]: "<html>\r\n<head><title>404 Not
Found</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>404
Not Found</h1></center>\r\n<hr><center>"

To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.

Those domains work because they navigate to the page fine.

Hi @r3d_f0x

I don't see a problem. Not with my browser, not via https://check-your-website.server-daten.de/?q=f0xwikis.rfx.fi

The certificate is new and valid, with a lot of domain names:

CN=f0xwikis.rfx.fi
	16.12.2020
	16.03.2021
expires in 90 days	analytics.r3df0x.com, cccrwiki.r3df0x.com, cccrwiki.rfx.fi, coc.r3df0x.com, code-of-conduct.r3df0x.com, codeofconduct.r3df0x.com, conservativesjw.r3df0x.com, f0xwikis.rfx.fi, global.r3df0x.com, guns.r3df0x.com, i.r3df0x.com, mail.dns.blacklist.r3df0x.com, metawiki.r3df0x.com, metawiki.rfx.fi, opennic.r3df0x.com, opennic.rfx.fi, r3df0x.com, resources.r3df0x.com, rfx.fi, shitlordsinaction.r3df0x.com, sturmovik.r3df0x.com, sturmovik.rfx.fi, template.r3df0x.com, thesexynerd.r3df0x.com, voynawiki.rfx.fi, www.cccrwiki.r3df0x.com, www.cccrwiki.rfx.fi, www.f0xwikis.rfx.fi, www.metawiki.r3df0x.com, www.metawiki.rfx.fi, www.opennic.r3df0x.com, www.opennic.rfx.fi, www.r3df0x.com, www.rfx.fi, www.sturmovik.r3df0x.com, www.sturmovik.rfx.fi, www.voynawiki.rfx.fi - 
37 entries

Grade C - no certificate problem, no mixed content warning.

Looks like your Chrome has an old cache.

1 Like

I thought it might be a browser problem. Is there a way to fix it in the browser? foxwikis.rfx.fi and the www version of that subdomain generate the error for certbot. I just added A records, but there was a wildcard for *.rfx.fi and f0xwikis.rfx.fi has been working.

That domain has the wrong certificate.

So your shared vHost isn't used.

What says

nginx -T

PS: It's a general problem.

If you have a port 80 vHost with 4 domain names, you should create a certificate with the same 4 domain names.

So Certbot can find the matching vHost and use that as template.

So your configuration is critical.

1 Like

Thats's a big help. Do you know what the best way to fix it would be?

This is the output from nginx -t:

    # configuration file /etc/nginx/nginx.conf:
    user www-data;
    worker_processes auto;
    pid /run/nginx.pid;

    events {
    	worker_connections 768;
    	# multi_accept on;
    }

    http {

    	##
    	# Basic Settings
    	##

    	sendfile on;
    	tcp_nopush on;
    	tcp_nodelay on;
    	keepalive_timeout 65;
    	types_hash_max_size 2048;
    	# server_tokens off;

    	# server_names_hash_bucket_size 64;
    	# server_name_in_redirect off;

    	include /etc/nginx/mime.types;
    	default_type application/octet-stream;

    	##
    	# SSL Settings
    	##

    	ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
    	ssl_prefer_server_ciphers on;

    	##
    	# Logging Settings
    	##

    	access_log /var/log/nginx/access.log;
    	error_log /var/log/nginx/error.log;

    	##
    	# Gzip Settings
    	##

    	gzip on;
    	gzip_disable "msie6";

    	# gzip_vary on;
    	# gzip_proxied any;
    	# gzip_comp_level 6;
    	# gzip_buffers 16 8k;
    	# gzip_http_version 1.1;
    	# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

    	##
    	# Virtual Host Configs
    	##

    	include /etc/nginx/conf.d/*.conf;
    	include /etc/nginx/sites-enabled/*;
    }


    #mail {
    #	# See sample authentication script at:
    #	# http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
    # 
    #	# auth_http localhost/auth.php;
    #	# pop3_capabilities "TOP" "USER";
    #	# imap_capabilities "IMAP4rev1" "UIDPLUS";
    # 
    #	server {
    #		listen     localhost:110;
    #		protocol   pop3;
    #		proxy      on;
    #	}
    # 
    #	server {
    #		listen     localhost:143;
    #		protocol   imap;
    #		proxy      on;
    #	}
    #}

    # configuration file /etc/nginx/mime.types:

    types {
        text/html                             html htm shtml;
        text/css                              css;
        text/xml                              xml;
        image/gif                             gif;
        image/jpeg                            jpeg jpg;
        application/javascript                js;
        application/atom+xml                  atom;
        application/rss+xml                   rss;

        text/mathml                           mml;
        text/plain                            txt;
        text/vnd.sun.j2me.app-descriptor      jad;
        text/vnd.wap.wml                      wml;
        text/x-component                      htc;

        image/png                             png;
        image/tiff                            tif tiff;
        image/vnd.wap.wbmp                    wbmp;
        image/x-icon                          ico;
        image/x-jng                           jng;
        image/x-ms-bmp                        bmp;
        image/svg+xml                         svg svgz;
        image/webp                            webp;

        application/font-woff                 woff;
        application/java-archive              jar war ear;
        application/json                      json;
        application/mac-binhex40              hqx;
        application/msword                    doc;
        application/pdf                       pdf;
        application/postscript                ps eps ai;
        application/rtf                       rtf;
        application/vnd.apple.mpegurl         m3u8;
        application/vnd.ms-excel              xls;
        application/vnd.ms-fontobject         eot;
        application/vnd.ms-powerpoint         ppt;
        application/vnd.wap.wmlc              wmlc;
        application/vnd.google-earth.kml+xml  kml;
        application/vnd.google-earth.kmz      kmz;
        application/x-7z-compressed           7z;
        application/x-cocoa                   cco;
        application/x-java-archive-diff       jardiff;
        application/x-java-jnlp-file          jnlp;
        application/x-makeself                run;
        application/x-perl                    pl pm;
        application/x-pilot                   prc pdb;
        application/x-rar-compressed          rar;
        application/x-redhat-package-manager  rpm;
        application/x-sea                     sea;
        application/x-shockwave-flash         swf;
        application/x-stuffit                 sit;
        application/x-tcl                     tcl tk;
        application/x-x509-ca-cert            der pem crt;
        application/x-xpinstall               xpi;
        application/xhtml+xml                 xhtml;
        application/xspf+xml                  xspf;
        application/zip                       zip;

        application/octet-stream              bin exe dll;
        application/octet-stream              deb;
        application/octet-stream              dmg;
        application/octet-stream              iso img;
        application/octet-stream              msi msp msm;

        application/vnd.openxmlformats-officedocument.wordprocessingml.document    docx;
        application/vnd.openxmlformats-officedocument.spreadsheetml.sheet          xlsx;
        application/vnd.openxmlformats-officedocument.presentationml.presentation  pptx;

        audio/midi                            mid midi kar;
        audio/mpeg                            mp3;
        audio/ogg                             ogg;
        audio/x-m4a                           m4a;
        audio/x-realaudio                     ra;

        video/3gpp                            3gpp 3gp;
        video/mp2t                            ts;
        video/mp4                             mp4;
        video/mpeg                            mpeg mpg;
        video/quicktime                       mov;
        video/webm                            webm;
        video/x-flv                           flv;
        video/x-m4v                           m4v;
        video/x-mng                           mng;
        video/x-ms-asf                        asx asf;
        video/x-ms-wmv                        wmv;
        video/x-msvideo                       avi;
    }

    # configuration file /etc/nginx/sites-enabled/7.62x54r.ru:
    server {

            root /var/www/7.62x54r.ru;
            index index.php index.html;

            server_name 7.62x54r.ru 62x54r.ru *.62x54r.ru;

            location / {
                    try_files $uri $uri/ /index.php?$args; #=404;
            }

            error_page 404 /404.html;
            error_page 500 502 503 504 /50x.html;
            location = /50x.html {
                    root /usr/share/nginx/html;
            }

      # Location
    #  location / {
    #    try_files $uri $uri/ @gnusocial;
    #  }

      # Fancy URLs
    #  location @gnusocial {
    #    rewrite ^(.*)$ /s/index.php?p=$1 last;
    #  }

      # Restrict access that is unnecessary anyway
    #  location ~ /\.(ht|git) {
    #    deny all;
    #  }


        if (!-e $request_filename) {
            rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last;
            rewrite ^/[_0-9a-zA-Z-]+.*(/wp-admin/.*\.php)$ $1 last;
            rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last;
        }

            location ~ \.php$ {
                    try_files $uri =404;
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    fastcgi_pass unix:/var/run/php5-fpm.sock;
                    fastcgi_index index.php;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    include fastcgi_params;
            }
     # managed by Certbot

        listen 443 ssl; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/r3df0x.com/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/r3df0x.com/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot









    }

    server {
        if ($host = 7.62x54r.ru) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = 62x54r.ru) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


    	listen 80;

            server_name 62x54r.ru 7.62x54r.ru *.62x54r.ru;
        return 404; # managed by Certbot




    }

    # configuration file /etc/nginx/fastcgi_params:

    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;

    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param  REQUEST_URI        $request_uri;
    fastcgi_param  DOCUMENT_URI       $document_uri;
    fastcgi_param  DOCUMENT_ROOT      $document_root;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;
    fastcgi_param  REQUEST_SCHEME     $scheme;
    fastcgi_param  HTTPS              $https if_not_empty;

    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  REMOTE_PORT        $remote_port;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;

    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;

    # configuration file /etc/letsencrypt/options-ssl-nginx.conf:
    # This file contains important security parameters. If you modify this file
    # manually, Certbot will be unable to automatically provide future security
    # updates. Instead, Certbot will print and log an error message with a path to
    # the up-to-date file that you will need to refer to when manually updating
    # this file.

    ssl_session_cache shared:le_nginx_SSL:10m;
    ssl_session_timeout 1440m;

    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers off;

    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";

    # configuration file /etc/nginx/sites-enabled/analytics.r3df0x.com:
    server {

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

            server_name analytics.r3df0x.com;

            location / {
                    try_files $uri $uri/ =404; #/index.php?$args;
            }

    	error_page 404 /404.html;
            error_page 500 502 503 504 /50x.html;
            location = /50x.html {
                    root /usr/share/nginx/html;
            }

            location ~ \.php$ {
                    try_files $uri =404;
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    fastcgi_pass unix:/var/run/php5-fpm.sock;
                    fastcgi_index index.php;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    include fastcgi_params;
            }

        listen 443 ssl; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/r3df0x.com-0001/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/r3df0x.com-0001/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot


        if ($scheme != "https") {
            return 301 https://$host$request_uri;
        } # managed by Certbot



























    }
    server {
        if ($host = analytics.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


    	listen 80;
            listen [::]:80;

            server_name analytics.r3df0x.com;
        return 404; # managed by Certbot


    }
    # configuration file /etc/nginx/fastcgi_params:

    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;

    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param  REQUEST_URI        $request_uri;
    fastcgi_param  DOCUMENT_URI       $document_uri;
    fastcgi_param  DOCUMENT_ROOT      $document_root;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;
    fastcgi_param  REQUEST_SCHEME     $scheme;
    fastcgi_param  HTTPS              $https if_not_empty;

    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  REMOTE_PORT        $remote_port;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;

    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;

    # configuration file /etc/letsencrypt/options-ssl-nginx.conf:
    # This file contains important security parameters. If you modify this file
    # manually, Certbot will be unable to automatically provide future security
    # updates. Instead, Certbot will print and log an error message with a path to
    # the up-to-date file that you will need to refer to when manually updating
    # this file.

    ssl_session_cache shared:le_nginx_SSL:10m;
    ssl_session_timeout 1440m;

    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers off;

    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";

    # configuration file /etc/nginx/sites-enabled/blacklists.conf:
    server {

            root /var/www/blacklists/mail-dns;
            index index.txt index.php index.html;

            server_name mail.dns.blacklist.r3df0x.com;

            location / {
                    try_files $uri $uri/ =404; #/index.php?$args;
            }

    	error_page 404 /404.html;
            error_page 500 502 503 504 /50x.html;
            location = /50x.html {
                    root /usr/share/nginx/html;
            }

            location ~ \.php$ {
                    try_files $uri =404;
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    fastcgi_pass unix:/var/run/php5-fpm.sock;
                    fastcgi_index index.php;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    include fastcgi_params;
            }

        listen 443 ssl; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/r3df0x.com-0001/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/r3df0x.com-0001/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot


        if ($scheme != "https") {
            return 301 https://$host$request_uri;
        } # managed by Certbot





























    }
    server {
        if ($host = mail.dns.blacklist.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


    	listen 80;
            listen [::]:80;

            server_name mail.dns.blacklist.r3df0x.com;
        return 404; # managed by Certbot


    }
    # configuration file /etc/nginx/fastcgi_params:

    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;

    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param  REQUEST_URI        $request_uri;
    fastcgi_param  DOCUMENT_URI       $document_uri;
    fastcgi_param  DOCUMENT_ROOT      $document_root;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;
    fastcgi_param  REQUEST_SCHEME     $scheme;
    fastcgi_param  HTTPS              $https if_not_empty;

    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  REMOTE_PORT        $remote_port;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;

    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;

    # configuration file /etc/letsencrypt/options-ssl-nginx.conf:
    # This file contains important security parameters. If you modify this file
    # manually, Certbot will be unable to automatically provide future security
    # updates. Instead, Certbot will print and log an error message with a path to
    # the up-to-date file that you will need to refer to when manually updating
    # this file.

    ssl_session_cache shared:le_nginx_SSL:10m;
    ssl_session_timeout 1440m;

    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers off;

    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";

    # configuration file /etc/nginx/sites-enabled/blog.oss:
    server {
    	root /var/www/blog.oss;
    	index index.php index.html;
    	server_name blog.oss *.blog.oss
    		chatbook.oss
    		*.chatbook.oss;

    	location / {
                    try_files $uri $uri/ /index.php?$args; #=404;
            }

    	location ~ \.php$ {
                    try_files $uri =404;
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    fastcgi_pass unix:/var/run/php5-fpm.sock;
                    fastcgi_index index.php;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    include fastcgi_params;
            }

    }

    # configuration file /etc/nginx/fastcgi_params:

    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;

    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param  REQUEST_URI        $request_uri;
    fastcgi_param  DOCUMENT_URI       $document_uri;
    fastcgi_param  DOCUMENT_ROOT      $document_root;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;
    fastcgi_param  REQUEST_SCHEME     $scheme;
    fastcgi_param  HTTPS              $https if_not_empty;

    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  REMOTE_PORT        $remote_port;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;

    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;

    # configuration file /etc/nginx/sites-enabled/cccrwiki.rfx.fi:
    server {

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

            server_name cccrwiki.rfx.fi www.cccrwiki.rfx.fi cccrwiki.r3df0x.com
    		www.cccrwiki.r3df0x.com;

            #location / {
            #        try_files $uri $uri/ =404; #/index.php?$args;
            #}

    	location / {
                    index index.php;
                    error_page 404 = @mediawiki;
            }

            location @mediawiki {
                    rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last;
            }

            error_page 404 /404.html;
            error_page 500 502 503 504 /50x.html;
            location = /50x.html {
                    root /usr/share/nginx/html;
            }

            location ~ \.php$ {
                    try_files $uri =404;
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    fastcgi_pass unix:/var/run/php5-fpm.sock;
                    fastcgi_index index.php;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    include fastcgi_params;
            }
     # managed by Certbot

        listen 443 ssl; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/r3df0x.com-0001/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/r3df0x.com-0001/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot








































































    }
    server {
        if ($host = www.cccrwiki.rfx.fi) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = cccrwiki.rfx.fi) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = www.cccrwiki.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = cccrwiki.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot



            server_name cccrwiki.rfx.fi www.cccrwiki.rfx.fi cccrwiki.r3df0x.com
    		www.cccrwiki.r3df0x.com;
        listen 80;
        return 404; # managed by Certbot








    }
    # configuration file /etc/nginx/fastcgi_params:

    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;

    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param  REQUEST_URI        $request_uri;
    fastcgi_param  DOCUMENT_URI       $document_uri;
    fastcgi_param  DOCUMENT_ROOT      $document_root;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;
    fastcgi_param  REQUEST_SCHEME     $scheme;
    fastcgi_param  HTTPS              $https if_not_empty;

    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  REMOTE_PORT        $remote_port;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;

    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;

    # configuration file /etc/letsencrypt/options-ssl-nginx.conf:
    # This file contains important security parameters. If you modify this file
    # manually, Certbot will be unable to automatically provide future security
    # updates. Instead, Certbot will print and log an error message with a path to
    # the up-to-date file that you will need to refer to when manually updating
    # this file.

    ssl_session_cache shared:le_nginx_SSL:10m;
    ssl_session_timeout 1440m;

    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers off;

    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";

    # configuration file /etc/nginx/sites-enabled/coc.r3df0x.com:
    server {

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

            server_name coc.r3df0x.com code-of-conduct.r3df0x.com codeofconduct.r3df0x.com;

            location / {
                    try_files $uri $uri/ =404;  #/index.php?$args; #=404;
            }

    	error_page 404 /404.html;
            error_page 500 502 503 504 /50x.html;
            location = /50x.html {
                    root /usr/share/nginx/html;
            }

            location ~ \.php$ {
                    try_files $uri =404;
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    fastcgi_pass unix:/var/run/php5-fpm.sock;
                    fastcgi_index index.php;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    include fastcgi_params;
            }

        listen 443 ssl; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/r3df0x.com-0001/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/r3df0x.com-0001/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot




        if ($scheme != "https") {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        # Redirect non-https traffic to https
        # if ($scheme != "https") {
        #     return 301 https://$host$request_uri;
        # } # managed by Certbot

I'm going to post in multiple parts because of the character limit.

Part 2

    }
    server {
        if ($host = codeofconduct.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = code-of-conduct.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = coc.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


    	listen 80;
            listen [::]:80;

            server_name coc.r3df0x.com code-of-conduct.r3df0x.com codeofconduct.r3df0x.com;
        return 404; # managed by Certbot






    }
    # configuration file /etc/nginx/fastcgi_params:

    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;

    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param  REQUEST_URI        $request_uri;
    fastcgi_param  DOCUMENT_URI       $document_uri;
    fastcgi_param  DOCUMENT_ROOT      $document_root;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;
    fastcgi_param  REQUEST_SCHEME     $scheme;
    fastcgi_param  HTTPS              $https if_not_empty;

    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  REMOTE_PORT        $remote_port;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;

    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;

    # configuration file /etc/letsencrypt/options-ssl-nginx.conf:
    # This file contains important security parameters. If you modify this file
    # manually, Certbot will be unable to automatically provide future security
    # updates. Instead, Certbot will print and log an error message with a path to
    # the up-to-date file that you will need to refer to when manually updating
    # this file.

    ssl_session_cache shared:le_nginx_SSL:10m;
    ssl_session_timeout 1440m;

    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers off;

    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";

    # configuration file /etc/nginx/sites-enabled/foxnic-register:
    server {
    	server_name register.rf.o;
    	listen 80;
            location / {
                    proxy_pass http://ns3.foxnic.rfx.fi:9191;
            }
    }

    # configuration file /etc/nginx/sites-enabled/i.r3df0x.com:
    server {

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

            server_name i.r3df0x.com;

            location / {
                    try_files $uri $uri/ =404; #/index.php?$args;
            }

    	error_page 404 /404.html;
            error_page 500 502 503 504 /50x.html;
            location = /50x.html {
                    root /usr/share/nginx/html;
            }

            location ~ \.php$ {
                    try_files $uri =404;
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    #                fastcgi_pass unix:/var/run/php5-fpm.sock;
    		fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
                    fastcgi_index index.php;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    include fastcgi_params;
            }

        listen 443 ssl; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/r3df0x.com-0001/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/r3df0x.com-0001/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot


        if ($scheme != "https") {
            return 301 https://$host$request_uri;
        } # managed by Certbot










    }
    server {
        if ($host = i.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


    	listen 80;
            listen [::]:80;

            server_name i.r3df0x.com;
        return 404; # managed by Certbot


    }

    # configuration file /etc/nginx/fastcgi_params:

    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;

    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param  REQUEST_URI        $request_uri;
    fastcgi_param  DOCUMENT_URI       $document_uri;
    fastcgi_param  DOCUMENT_ROOT      $document_root;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;
    fastcgi_param  REQUEST_SCHEME     $scheme;
    fastcgi_param  HTTPS              $https if_not_empty;

    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  REMOTE_PORT        $remote_port;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;

    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;

    # configuration file /etc/letsencrypt/options-ssl-nginx.conf:
    # This file contains important security parameters. If you modify this file
    # manually, Certbot will be unable to automatically provide future security
    # updates. Instead, Certbot will print and log an error message with a path to
    # the up-to-date file that you will need to refer to when manually updating
    # this file.

    ssl_session_cache shared:le_nginx_SSL:10m;
    ssl_session_timeout 1440m;

    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers off;

    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";

    # configuration file /etc/nginx/sites-enabled/metawiki.rfx.fi:
    server {

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

            server_name metawiki.rfx.fi www.metawiki.rfx.fi metawiki.r3df0x.com
    		www.metawiki.r3df0x.com;

            #location / {
            #        try_files $uri $uri/ =404; #/index.php?$args;
            #}

    	location / {
                    index index.php;
                    error_page 404 = @mediawiki;
            }

            location @mediawiki {
                    rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last;
            }

            error_page 404 /404.html;
            error_page 500 502 503 504 /50x.html;
            location = /50x.html {
                    root /usr/share/nginx/html;
            }

            location ~ \.php$ {
                    try_files $uri =404;
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    fastcgi_pass unix:/var/run/php5-fpm.sock;
                    fastcgi_index index.php;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    include fastcgi_params;
            }

        listen 443 ssl; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/r3df0x.com-0001/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/r3df0x.com-0001/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot





        if ($scheme != "https") {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        # Redirect non-https traffic to https
        # if ($scheme != "https") {
        #     return 301 https://$host$request_uri;
        # } # managed by Certbot





























































































    }
    server {
        if ($host = www.metawiki.rfx.fi) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = metawiki.rfx.fi) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = www.metawiki.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = metawiki.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


            listen 80;
            listen [::]:80;

            server_name metawiki.rfx.fi www.metawiki.rfx.fi metawiki.r3df0x.com
    		www.metawiki.r3df0x.com;
        return 404; # managed by Certbot





    }
    # configuration file /etc/nginx/fastcgi_params:

    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;

    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param  REQUEST_URI        $request_uri;
    fastcgi_param  DOCUMENT_URI       $document_uri;
    fastcgi_param  DOCUMENT_ROOT      $document_root;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;
    fastcgi_param  REQUEST_SCHEME     $scheme;
    fastcgi_param  HTTPS              $https if_not_empty;

    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  REMOTE_PORT        $remote_port;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;

    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;

    # configuration file /etc/letsencrypt/options-ssl-nginx.conf:
    # This file contains important security parameters. If you modify this file
    # manually, Certbot will be unable to automatically provide future security
    # updates. Instead, Certbot will print and log an error message with a path to
    # the up-to-date file that you will need to refer to when manually updating
    # this file.

    ssl_session_cache shared:le_nginx_SSL:10m;
    ssl_session_timeout 1440m;

    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers off;

    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";

    # configuration file /etc/nginx/sites-enabled/opennic-proxy:
    server {
    	server_name opennic.rfs
                    www.opennic.rfs
                    opennic.pol
                    www.opennic.pol
                    opennic.ssr
                    www.opennic.ssr
                    opennic.sct
                    www.opennic.sct
                    opennic.mag
                    www.opennic.mag
                    opennic.srb
                    www.opennic.srb
    		foxnic.oss
    		www.foxnic.oss;

    	listen 80;
    	location / {
    		proxy_pass https://www.opennic.rfx.fi;
    	}
    }

    # configuration file /etc/nginx/sites-enabled/opennic.r3df0x.com:
    server {

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

    	server_name opennic.r3df0x.com
    		www.opennic.r3df0x.com
    		opennic.rfx.fi
    		www.opennic.rfx.fi;

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

    	location ~ \.php$ {
                    try_files $uri =404;
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    fastcgi_pass unix:/var/run/php5-fpm.sock;
                    fastcgi_index index.php;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    include fastcgi_params;
            }


        listen 443 ssl; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/r3df0x.com-0001/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/r3df0x.com-0001/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot




















































    }
    server {
        if ($host = www.opennic.rfx.fi) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = opennic.rfx.fi) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = www.opennic.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = opennic.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


    	listen 80;

    	server_name opennic.r3df0x.com
    		www.opennic.r3df0x.com
    		opennic.rfx.fi
    		www.opennic.rfx.fi
        return 404; # managed by Certbot








    }

    # configuration file /etc/nginx/fastcgi_params:

    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;

    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param  REQUEST_URI        $request_uri;
    fastcgi_param  DOCUMENT_URI       $document_uri;
    fastcgi_param  DOCUMENT_ROOT      $document_root;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;
    fastcgi_param  REQUEST_SCHEME     $scheme;
    fastcgi_param  HTTPS              $https if_not_empty;

    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  REMOTE_PORT        $remote_port;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;

    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;

    # configuration file /etc/letsencrypt/options-ssl-nginx.conf:
    # This file contains important security parameters. If you modify this file
    # manually, Certbot will be unable to automatically provide future security
    # updates. Instead, Certbot will print and log an error message with a path to
    # the up-to-date file that you will need to refer to when manually updating
    # this file.

    ssl_session_cache shared:le_nginx_SSL:10m;
    ssl_session_timeout 1440m;

    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers off;

    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";

    # configuration file /etc/nginx/sites-enabled/r3df0x.com:
    server {

    #	listen 443 ssl;
    	root /var/www/home;
    	index index.php index.html;

    	server_name r3df0x.com www.r3df0x.com
    		shitlordsinaction.r3df0x.com
    		thesexynerd.r3df0x.com
    		guns.r3df0x.com
    		conservativesjw.r3df0x.com
    		antislavists.r3df0x.com;

    	location / {
    		try_files $uri $uri/ /index.php?$args; #=404;
    	}

    	location /w {
    		index index.php;
    		error_page 404 = @mediawiki;
     	}
     
    	location @mediawiki {
    		rewrite ^/w([^?]*)(?:\?(.*))? /wiki/index.php?title=$1&$2 last;
    	}

    	error_page 404 /404.html;
    	error_page 500 502 503 504 /50x.html;
    	location = /50x.html {
    		root /usr/share/nginx/html;
    	}

    	location ~ \.php$ {
            	try_files $uri =404;
            	fastcgi_split_path_info ^(.+\.php)(/.+)$;
    #        	fastcgi_pass unix:/var/run/php5-fpm.sock;
    		fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
            	fastcgi_index index.php;
            	fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            	include fastcgi_params;
        	}

        listen 443 ssl; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/r3df0x.com-0001/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/r3df0x.com-0001/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot



        if ($scheme != "https") {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        # Redirect non-https traffic to https
        # if ($scheme != "https") {
        #     return 301 https://$host$request_uri;
        # } # managed by Certbot

    #	#Wordpress
    #	RewriteEngine On
    #	RewriteBase /
    #	RewriteRule ^index\.php$ - [L]
    #
    #	# add a trailing slash to /wp-admin
    #	RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    #
    #	RewriteCond %{REQUEST_FILENAME} -f [OR]
    #	RewriteCond %{REQUEST_FILENAME} -d
    #	RewriteRule ^ - [L]
    #	RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    #	RewriteRule ^(.*\.php)$ $1 [L]
    #	RewriteRule . index.php [L]























































    }
    server {
        if ($host = www.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = thesexynerd.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = shitlordsinaction.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = guns.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = conservativesjw.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


    	listen 80 default_server;
    	listen [::]:80;

    	server_name r3df0x.com www.r3df0x.com
    		shitlordsinaction.r3df0x.com
    		thesexynerd.r3df0x.com
    		guns.r3df0x.com
    		conservativesjw.r3df0x.com;
        return 404; # managed by Certbot

    }

    server {
        if ($host = www.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = thesexynerd.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = shitlordsinaction.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = guns.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = conservativesjw.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot
        server_name www.rfx.fi rfx.fi; # managed by Certbot
        return 404; # managed by Certbot


        listen [::]:443 ssl; # managed by Certbot
        listen 443 ssl; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/r3df0x.com-0001/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/r3df0x.com-0001/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

Part 3

    }
    server {
        if ($host = www.rfx.fi) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = rfx.fi) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


    	listen 80 ;
    	listen [::]:80;
        server_name www.rfx.fi rfx.fi;
        return 404; # managed by Certbot

    }

    # configuration file /etc/nginx/fastcgi_params:

    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;

    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param  REQUEST_URI        $request_uri;
    fastcgi_param  DOCUMENT_URI       $document_uri;
    fastcgi_param  DOCUMENT_ROOT      $document_root;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;
    fastcgi_param  REQUEST_SCHEME     $scheme;
    fastcgi_param  HTTPS              $https if_not_empty;

    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  REMOTE_PORT        $remote_port;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;

    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;

    # configuration file /etc/letsencrypt/options-ssl-nginx.conf:
    # This file contains important security parameters. If you modify this file
    # manually, Certbot will be unable to automatically provide future security
    # updates. Instead, Certbot will print and log an error message with a path to
    # the up-to-date file that you will need to refer to when manually updating
    # this file.

    ssl_session_cache shared:le_nginx_SSL:10m;
    ssl_session_timeout 1440m;

    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers off;

    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";

    # configuration file /etc/letsencrypt/options-ssl-nginx.conf:
    # This file contains important security parameters. If you modify this file
    # manually, Certbot will be unable to automatically provide future security
    # updates. Instead, Certbot will print and log an error message with a path to
    # the up-to-date file that you will need to refer to when manually updating
    # this file.

    ssl_session_cache shared:le_nginx_SSL:10m;
    ssl_session_timeout 1440m;

    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers off;

    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";

    # configuration file /etc/nginx/sites-enabled/resources:
    server {

            root /var/www/resources;
            index index.html index.htm index.nginx-debian.html;

            server_name resources.r3df0x.com;

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

        listen [::]:443 ssl ipv6only=on; # managed by Certbot
        listen 443 ssl; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/r3df0x.com-0001/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/r3df0x.com-0001/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot




















    }
    server {
        if ($host = resources.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


            listen 80;
            listen [::]:80;

            server_name resources.r3df0x.com;
        return 404; # managed by Certbot


    }
    # configuration file /etc/letsencrypt/options-ssl-nginx.conf:
    # This file contains important security parameters. If you modify this file
    # manually, Certbot will be unable to automatically provide future security
    # updates. Instead, Certbot will print and log an error message with a path to
    # the up-to-date file that you will need to refer to when manually updating
    # this file.

    ssl_session_cache shared:le_nginx_SSL:10m;
    ssl_session_timeout 1440m;

    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers off;

    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";

    # configuration file /etc/nginx/sites-enabled/sturmovik.rfx.fi:
    server {

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

            server_name voynawiki.rfx.fi www.voynawiki.rfx.fi
    		sturmovik.rfx.fi www.sturmovik.rfx.fi
    		sturmovik.r3df0x.com www.sturmovik.r3df0x.com;

            #location / {
            #        try_files $uri $uri/ =404; #/index.php?$args;
            #}

    	location / {
                    index index.php;
                    error_page 404 = @mediawiki;
            }

            location @mediawiki {
                    rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last;
            }

            error_page 404 /404.html;
            error_page 500 502 503 504 /50x.html;
            location = /50x.html {
                    root /usr/share/nginx/html;
            }

            location ~ \.php$ {
                    try_files $uri =404;
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    fastcgi_pass unix:/var/run/php5-fpm.sock;
                    fastcgi_index index.php;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    include fastcgi_params;
            }
     # managed by Certbot

        listen 443 ssl; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/r3df0x.com-0001/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/r3df0x.com-0001/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot




































































































    }
    server {
        if ($host = www.sturmovik.rfx.fi) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = sturmovik.rfx.fi) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = www.sturmovik.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = sturmovik.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot



            server_name sturmovik.rfx.fi www.sturmovik.rfx.fi sturmovik.r3df0x.com
    		www.sturmovik.r3df0x.com;
        listen 80;
        return 404; # managed by Certbot








    }

    # configuration file /etc/nginx/fastcgi_params:

    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;

    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param  REQUEST_URI        $request_uri;
    fastcgi_param  DOCUMENT_URI       $document_uri;
    fastcgi_param  DOCUMENT_ROOT      $document_root;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;
    fastcgi_param  REQUEST_SCHEME     $scheme;
    fastcgi_param  HTTPS              $https if_not_empty;

    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  REMOTE_PORT        $remote_port;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;

    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;

    # configuration file /etc/letsencrypt/options-ssl-nginx.conf:
    # This file contains important security parameters. If you modify this file
    # manually, Certbot will be unable to automatically provide future security
    # updates. Instead, Certbot will print and log an error message with a path to
    # the up-to-date file that you will need to refer to when manually updating
    # this file.

    ssl_session_cache shared:le_nginx_SSL:10m;
    ssl_session_timeout 1440m;

    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers off;

    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";

    # configuration file /etc/nginx/sites-enabled/wiki.oss:
    server {
    	root /var/www/wiki.oss;
    	index index.php index.html;
    	server_name wiki.oss *.wiki.oss
    		volk.ssr
    		www.volk.ssr;

    	location / {
                    index index.php;
                    error_page 404 = @mediawiki;
            }

            location @mediawiki {
                    rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last;
            }

    	location ~ \.php$ {
                    try_files $uri =404;
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    fastcgi_pass unix:/var/run/php5-fpm.sock;
                    fastcgi_index index.php;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    include fastcgi_params;
            }
    }

    # configuration file /etc/nginx/fastcgi_params:

    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;

    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param  REQUEST_URI        $request_uri;
    fastcgi_param  DOCUMENT_URI       $document_uri;
    fastcgi_param  DOCUMENT_ROOT      $document_root;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;
    fastcgi_param  REQUEST_SCHEME     $scheme;
    fastcgi_param  HTTPS              $https if_not_empty;

    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  REMOTE_PORT        $remote_port;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;

    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;

    # configuration file /etc/nginx/sites-enabled/wikifamily:
    server {
    	root /var/www/wikifamily;
    	index index.php;

    	server_name f0xwikis.rfx.fi
    		www.f0xwikis.rfx.fi
    		foxwikis.rfx.fi
    		www.foxwikis.rfx.fi;

    	  location ~* \.php$ {
       		 fastcgi_pass unix:/run/php/php7.3-fpm.sock;
       		 include         fastcgi_params;
       		 fastcgi_param   SCRIPT_FILENAME    $document_root$fastcgi_script_name;
       		 fastcgi_param   SCRIPT_NAME        $fastcgi_script_name;
    	  }

        listen 443 ssl; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/r3df0x.com-0001/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/r3df0x.com-0001/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


    }
    server {
        if ($host = www.f0xwikis.rfx.fi) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = f0xwikis.rfx.fi) {
            return 301 https://$host$request_uri;
        } # managed by Certbot

    	listen 80;

    	server_name f0xwikis.rfx.fi
    		www.f0xwikis.rfx.fi
    		foxwikis.rfx.fi
    		www.foxwikis.rfx.fi;
        return 404; # managed by Certbot




    }

    # configuration file /etc/nginx/fastcgi_params:

    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;

    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param  REQUEST_URI        $request_uri;
    fastcgi_param  DOCUMENT_URI       $document_uri;
    fastcgi_param  DOCUMENT_ROOT      $document_root;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;
    fastcgi_param  REQUEST_SCHEME     $scheme;
    fastcgi_param  HTTPS              $https if_not_empty;

    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  REMOTE_PORT        $remote_port;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;

    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;

    # configuration file /etc/letsencrypt/options-ssl-nginx.conf:
    # This file contains important security parameters. If you modify this file
    # manually, Certbot will be unable to automatically provide future security
    # updates. Instead, Certbot will print and log an error message with a path to
    # the up-to-date file that you will need to refer to when manually updating
    # this file.

    ssl_session_cache shared:le_nginx_SSL:10m;
    ssl_session_timeout 1440m;

    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers off;

    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";

    # configuration file /etc/nginx/sites-enabled/wikis.conf:
    server {

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

            server_name global.r3df0x.com template.r3df0x.com;

            #location / {
            #        try_files $uri $uri/ =404; #/index.php?$args;
            #}

    	location / {
                    index index.php;
                    error_page 404 = @mediawiki;
            }

            location @mediawiki {
                    rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last;
            }

    	error_page 404 /404.html;
            error_page 500 502 503 504 /50x.html;
            location = /50x.html {
                    root /usr/share/nginx/html;
            }

            location ~ \.php$ {
                    try_files $uri =404;
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    #                fastcgi_pass unix:/var/run/php5-fpm.sock;
    		fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
                    fastcgi_index index.php;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    include fastcgi_params;
            }

        listen 443 ssl; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/r3df0x.com-0001/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/r3df0x.com-0001/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot



        if ($scheme != "https") {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        # Redirect non-https traffic to https
        # if ($scheme != "https") {
        #     return 301 https://$host$request_uri;
        # } # managed by Certbot









































    }
    server {
        if ($host = template.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


        if ($host = global.r3df0x.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot


    	listen 80;
            listen [::]:80;

            server_name global.r3df0x.com template.r3df0x.com;
        return 404; # managed by Certbot




    }

    # configuration file /etc/nginx/fastcgi_params:

    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;

    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param  REQUEST_URI        $request_uri;
    fastcgi_param  DOCUMENT_URI       $document_uri;
    fastcgi_param  DOCUMENT_ROOT      $document_root;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;
    fastcgi_param  REQUEST_SCHEME     $scheme;
    fastcgi_param  HTTPS              $https if_not_empty;

    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  REMOTE_PORT        $remote_port;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;

    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;

    # configuration file /etc/letsencrypt/options-ssl-nginx.conf:
    # This file contains important security parameters. If you modify this file
    # manually, Certbot will be unable to automatically provide future security
    # updates. Instead, Certbot will print and log an error message with a path to
    # the up-to-date file that you will need to refer to when manually updating
    # this file.

    ssl_session_cache shared:le_nginx_SSL:10m;
    ssl_session_timeout 1440m;

    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers off;

    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";

So that vHost is used.

But your command doesn't match a vHost.

Create one certificate with these 4 domain names.

But there is a certificate used. Check

certbot certificates

to see, if

/etc/letsencrypt/live/r3df0x.com-0001

has the correct domain names.

1 Like

This is the output:

root@f0x-kali:~# certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
  Certificate Name: 7.62x54r.ru
    Serial Number: 40b3114320a3f8c98ed38d9756d3b06fdfd
    Key Type: RSA
    Domains: 62x54r.ru 7.62x54r.ru
    Expiry Date: 2021-02-13 11:29:33+00:00 (VALID: 58 days)
    Certificate Path: /etc/letsencrypt/live/7.62x54r.ru/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/7.62x54r.ru/privkey.pem
  Certificate Name: r3df0x.com-0001
    Serial Number: 4972e77145a08fc24e0117094b2a61ac169
    Key Type: RSA
    Domains: f0xwikis.rfx.fi analytics.r3df0x.com cccrwiki.r3df0x.com cccrwiki.rfx.fi coc.r3df0x.com code-of-conduct.r3df0x.com codeofconduct.r3df0x.com conservativesjw.r3df0x.com global.r3df0x.com guns.r3df0x.com i.r3df0x.com mail.dns.blacklist.r3df0x.com metawiki.r3df0x.com metawiki.rfx.fi opennic.r3df0x.com opennic.rfx.fi r3df0x.com resources.r3df0x.com rfx.fi shitlordsinaction.r3df0x.com sturmovik.r3df0x.com sturmovik.rfx.fi template.r3df0x.com thesexynerd.r3df0x.com voynawiki.rfx.fi www.cccrwiki.r3df0x.com www.cccrwiki.rfx.fi www.f0xwikis.rfx.fi www.metawiki.r3df0x.com www.metawiki.rfx.fi www.opennic.r3df0x.com www.opennic.rfx.fi www.r3df0x.com www.rfx.fi www.sturmovik.r3df0x.com www.sturmovik.rfx.fi www.voynawiki.rfx.fi
    Expiry Date: 2021-03-16 01:48:26+00:00 (VALID: 89 days)
    Certificate Path: /etc/letsencrypt/live/r3df0x.com-0001/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/r3df0x.com-0001/privkey.pem
  Certificate Name: r3df0x.com-0002
    Serial Number: 36a64b2d18023ca1b84e2005308bad32b0b
    Key Type: RSA
    Domains: r3df0x.com analytics.r3df0x.com coc.r3df0x.com code-of-conduct.r3df0x.com codeofconduct.r3df0x.com conservativesjw.r3df0x.com guns.r3df0x.com i.r3df0x.com mail.dns.blacklist.r3df0x.com metawiki.r3df0x.com metawiki.rfx.fi resources.r3df0x.com shitlordsinaction.r3df0x.com thesexynerd.r3df0x.com www.metawiki.r3df0x.com www.metawiki.rfx.fi www.r3df0x.com
    Expiry Date: 2021-02-09 11:30:02+00:00 (VALID: 54 days)
    Certificate Path: /etc/letsencrypt/live/r3df0x.com-0002/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/r3df0x.com-0002/privkey.pem
  Certificate Name: r3df0x.com
    Serial Number: 3afd369c756de38daa8b76a06a48ab17399
    Key Type: RSA
    Domains: r3df0x.com 62x54r.ru 7.62x54r.ru analytics.r3df0x.com antislavists.r3df0x.com cccrwiki.r3df0x.com cccrwiki.rfx.fi coc.r3df0x.com code-of-conduct.r3df0x.com codeofconduct.r3df0x.com conservativesjw.r3df0x.com global.r3df0x.com guns.r3df0x.com i.r3df0x.com mail.dns.blacklist.r3df0x.com metawiki.r3df0x.com metawiki.rfx.fi opennic.r3df0x.com opennic.rfx.fi resources.r3df0x.com shitlordsinaction.r3df0x.com sturmovik.r3df0x.com sturmovik.rfx.fi template.r3df0x.com thesexynerd.r3df0x.com voynawiki.rfx.fi www.cccrwiki.r3df0x.com www.cccrwiki.rfx.fi www.metawiki.r3df0x.com www.metawiki.rfx.fi www.opennic.r3df0x.com www.opennic.rfx.fi www.r3df0x.com www.sturmovik.r3df0x.com www.sturmovik.rfx.fi www.voynawiki.rfx.fi
    Expiry Date: 2021-03-02 23:38:40+00:00 (VALID: 76 days)
    Certificate Path: /etc/letsencrypt/live/r3df0x.com/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/r3df0x.com/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

I'm going to try running a command for those four domains.

I ran the command and got this:

  certbot --nginx -d f0xwikis.rfx.fi -d www.f0xwikis.rfx.fi -d foxwikis.rfx.fi -d www.foxwikis.rfx.fi
  Saving debug log to /var/log/letsencrypt/letsencrypt.log
  Plugins selected: Authenticator nginx, Installer nginx
  Requesting a certificate for f0xwikis.rfx.fi and 3 more domains
  Performing the following challenges:
  http-01 challenge for foxwikis.rfx.fi
  http-01 challenge for www.foxwikis.rfx.fi
  Waiting for verification...
  Challenge failed for domain foxwikis.rfx.fi
  Challenge failed for domain www.foxwikis.rfx.fi
  http-01 challenge for foxwikis.rfx.fi
  http-01 challenge for www.foxwikis.rfx.fi
  Cleaning up challenges
  Some challenges have failed.

  IMPORTANT NOTES:
   - The following errors were reported by the server:

     Domain: foxwikis.rfx.fi
     Type:   unauthorized
     Detail: Invalid response from
     http://foxwikis.rfx.fi/.well-known/acme-challenge/F0hrGIBrhEDkq6UBS2Lns4P2HY66XqPeU2QNJ3AnVWs
     [192.241.132.174]: "<html>\r\n<head><title>404 Not
     Found</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>404
     Not Found</h1></center>\r\n<hr><center>"

     Domain: www.foxwikis.rfx.fi
     Type:   unauthorized
     Detail: Invalid response from
     http://www.foxwikis.rfx.fi/.well-known/acme-challenge/MYtpj9FmSYeajVNZ22OJpoPAr9P5sHWVt4CXqLavH3s
     [192.241.132.174]: "<html>\r\n<head><title>404 Not
     Found</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>404
     Not Found</h1></center>\r\n<hr><center>"

     To fix these errors, please make sure that your domain name was
     entered correctly and the DNS A/AAAA record(s) for that domain
     contain(s) the right IP address.

I had commented out the old certbot information from the vhost file so that it would start over:

server {
        root /var/www/wikifamily;
        index index.php;

        server_name f0xwikis.rfx.fi
                www.f0xwikis.rfx.fi
                foxwikis.rfx.fi
                www.foxwikis.rfx.fi;

          location ~* \.php$ {
                 fastcgi_pass unix:/run/php/php7.3-fpm.sock;
                 include         fastcgi_params;
                 fastcgi_param   SCRIPT_FILENAME    $document_root$fastcgi_script_name;
                 fastcgi_param   SCRIPT_NAME        $fastcgi_script_name;
          }

}

#    listen 443 ssl; # managed by Certbot
#    ssl_certificate /etc/letsencrypt/live/r3df0x.com-0001/fullchain.pem; # managed by Certbot
#    ssl_certificate_key /etc/letsencrypt/live/r3df0x.com-0001/privkey.pem; # managed by Certbot
#    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
#    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
#}
#server {
#    if ($host = www.f0xwikis.rfx.fi) {
#        return 301 https://$host$request_uri;
#    } # managed by Certbot
#    if ($host = f0xwikis.rfx.fi) {
#        return 301 https://$host$request_uri;
#    } # managed by Certbot
#       listen 80;
#       server_name f0xwikis.rfx.fi
#               www.f0xwikis.rfx.fi
#               foxwikis.rfx.fi
#               www.foxwikis.rfx.fi;
#    return 404; # managed by Certbot
#}

I'll try uncommenting and see if it will work.

Please read a lot of basics if you edit such files.

# Listen 80;

so there is no port 80 vHost, so the wrong result is expected.

1 Like

Certbot moves listen 80; to a different server block when it runs for the redirect to https. I forgot to add it to the old one.

I have this:

server {
        listen 80;
        root /var/www/wikifamily;
        index index.php;

        server_name f0xwikis.rfx.fi
                www.f0xwikis.rfx.fi
                foxwikis.rfx.fi
                www.foxwikis.rfx.fi;

          location ~* \.php$ {
                 fastcgi_pass unix:/run/php/php7.3-fpm.sock;
                 include         fastcgi_params;
                 fastcgi_param   SCRIPT_FILENAME    $document_root$fastcgi_script_name;
                 fastcgi_param   SCRIPT_NAME        $fastcgi_script_name;
          }
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.