Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jcburley

    (@jcburley)

    Ah, fixed it! The problem was the “=404” at the end of try_files in my config. (I had added it at some point to try to fix something, I think.)

    Thread Starter jcburley

    (@jcburley)

    Note that what gets downloaded is index.php, which presumably works with other URLs, else WP wouldn’t work well at all on the site.

    Also, in case it matters, here’s the “default” config for Nginx:

    upstream http_backend {
        server 127.0.0.1:5000;
        keepalive 32;
        }
    
    server {
        server_name dove.llamail.com;
    
        root /var/www/html;
    
        # SSL configuration
    
        listen 443 ssl default_server;
        listen [::]:443 ssl default_server;
        ssl_certificate /etc/letsencrypt/live/llamail.com/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/llamail.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
    
        # Note: You should disable gzip for SSL traffic.
        # See: https://bugs.debian.org/773332
        #
        # Read up on ssl_ciphers to ensure a secure configuration.
        # See: https://bugs.debian.org/765782
        #
        # Self signed certs generated by the ssl-cert package
        # Don't use them in a production server!
        #
        # include snippets/snakeoil.conf;
    
        # Add index.php to the list if you are using PHP
        index index.php index.html index.htm index.nginx-debian.html;
    
        location / {
            try_files $uri $uri/ /index.php$is_args$args =404;
        }
    
        location ~ \.php$ {
            include snippets/fastcgi-php.conf;
            fastcgi_pass unix:/run/php/php7.2-fpm.sock;
        }
    
        location ~ /\.ht {
            deny all;
        }
    
        location = /favicon.ico { log_not_found off; access_log off; }
        location = /robots.txt { log_not_found off; access_log off; allow all; }
        location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
            expires max;
            log_not_found off;
        }
    
        location /do-clojure-web {  # This no longer works. Was fine at "/". No idea why.
            proxy_pass http://http_backend;
    
            proxy_http_version 1.1;
            proxy_set_header Connection "";
    
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $http_host;
    
            access_log /var/www/logs/do-clojure-web.access.log;
            error_log /var/www/logs/do-clojure-web.error.log;
        }
    }
    server {
        if ($host = www.llamail.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot
    
        if ($host = llamail.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot
    
        listen 80;
        listen [::]:80;
    
        server_name llamail.com www.llamail.com;
    
        return 404;
    }

    (It continues on, listing unrelated virtual servers that are subdomains of the primary domain for the host.)

Viewing 2 replies - 1 through 2 (of 2 total)