Ask A Question

Notifications

You’re not receiving notifications from this thread.

Free SSL with Rails and Nginx using Let's Encrypt

Chris Oliver asked in General

nice tutorial! exactly what i was looking for!

Reply

Спасибо!

Reply
Alejandro Ventura Alejandro Ventura

I got this error after running *./letsencrypt-auto*


...
Setting up python-pkg-resources (20.7.0-1) ...
Setting up python-virtualenv (15.0.1+ds-3ubuntu1) ...
Setting up python3-virtualenv (15.0.1+ds-3ubuntu1) ...
Setting up virtualenv (15.0.1+ds-3ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
Creating virtual environment...
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv.py", line 2363, in <module>
main()
File "/usr/lib/python3/dist-packages/virtualenv.py", line 719, in main
symlink=options.symlink)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 988, in create_environment
download=download,
File "/usr/lib/python3/dist-packages/virtualenv.py", line 918, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 812, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home/deploy/.local/...ncrypt/bin/python2.7 - setuptools pkg_resources pip wheel failed with error code 1

Any help with this?

Reply
Jaunty Kaushal Jaunty Kaushal

I used: sudo apt install letsencrypt

It worked well (you just have to update the paths for the command).

Reply

Getting the following error after running `./letsencrypt-auto`

`Failed to install a working "virtualenv" command, exiting`

Reply

I followed these steps and found that `sudo apt-get install letsencrypt` got me up and running. No need to install from github source. https://certbot.eff.org/#ub...

Reply

@excid3:disqus what do you mean by `Add the following lines to your server block for your app and be sure to change example.com to your domain.`

Where do I find the `server block`? Is this the `/etc/nginx/nginx.conf` file `server { }`

Reply

Or in my case as I am running passenger `sudo nano /etc/nginx/sites-enabled/default`

Reply

Awesome! So is there any way to know for sure that the renew cron job is running? I guess one way is to just make sure I'm not getting renewal emails? It'd be nice if there was some way to check the status of a cert, or to know that the job ran?

Reply

Let's encrypt should write logs somewhere, or you could tack on a little bash snippet have it output top your own log file too and write the last timestamp it ran.

Reply
vic turuthi vic turuthi

Awesome tutorial Chris. You're the best. I restarted the server with no error. However, the browser still shows that my connection is insecure and doesn't show a green padlock. SSL checker shows that the two domains www.example.com and example.com are encrypted. What could be the issue?

Reply

Hey Chris Oliver any tips for doing this when running multiple domains on one server or having subdomains. ie example..com and foo.example.com. I have two server blocks for nginx but they are trying to share the same certificate so chrome throws an error around security.

Reply

You'd want two server blocks like you said and each one would point to different SSL certs if you wanted them both on SSL.

Reply

Failed authorization procedure. time out

Reply

Hi! Thanks for the awesome tutorial. I have a problem after the certbot installation on server. And now I can't run rake assets:precompile as usual. How can I fix this? I post my issue here: https://stackoverflow.com/q...

Reply

Thanks!

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,329+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.