Giter Club home page Giter Club logo

Comments (7)

liaralabs avatar liaralabs commented on May 20, 2024

Hey @mhertel, sorry you're still having issues. Clean or dirty install from the last issue?

If you're using a dirty install, there are some things that need to be updated in /etc/nginx/sites-enabled/default in order for this to start working.

The easiest way to get you going without reinstalling nginx or the entire box would be:

hostname=sub.domain.com(enter your (sub)domain here)
rm -rf /etc/nginx/ssl/${hostname}
cat > /etc/nginx/sites-enabled/default <<NGC
server {
  listen 80 default_server;
  listen [::]:80 default_server;
  server_name _;

  location /.well-known {
    alias /srv/.well-known;
    allow all;
    default_type "text/plain";
    autoindex    on;
  }

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

# SSL configuration
server {
  listen 443 ssl default_server;
  listen [::]:443 ssl default_server;
  server_name _;
  ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
  ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
  include snippets/ssl-params.conf;
  client_max_body_size 40M;
  server_tokens off;
  root /srv/;

  index index.html index.php index.htm;

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

  include /etc/nginx/apps/*;

  location ~ /\.ht {
    deny all;
  }

  location /fancyindex {

  }
}
NGC

This will rebuild nginx with the proper configuration and wipe out the empty ssl certs from a botched install. If you run the updated letsencrypt script, it should find the necessary hooks to inject your hostname for acme.sh to find them.

Please let me know if you're still running into issues after this

from swizzin.

mhertel avatar mhertel commented on May 20, 2024

I actually did a clean install after it failed last time since I couldnt get nginx to run properly again LOL

I will try out what you posted and will report back..

from swizzin.

mhertel avatar mhertel commented on May 20, 2024

ok, it worked.. I also changed my hostname to what letsencrypt was looking for.

Cheers!

from swizzin.

mhertel avatar mhertel commented on May 20, 2024

Hmm, letsencrypt worked, but now rutorrent won't connect to rtorrent any more.. Let's see what I broke now lol

from swizzin.

mhertel avatar mhertel commented on May 20, 2024

I got it working now, some of the copy paste for the nginx config was borked..

from swizzin.

liaralabs avatar liaralabs commented on May 20, 2024

That's why I recommend cat -- the cat command necessarily has to escape the $ in the file, otherwise cat will expand them as variables (which are null)

fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;

becomes

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

Once the command is done.

Is this safe to close now?

from swizzin.

mhertel avatar mhertel commented on May 20, 2024

Yes, thanks again!

from swizzin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.