LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-30-2016, 10:37 AM   #1
red king
LQ Newbie
 
Registered: Jul 2016
Posts: 23

Rep: Reputation: Disabled
I need some helpt with LetsEncrypt and Owncloud


I am trying to figure out how to get a real certificate working for my owncloud server as it seems I cannot use the mobile apps with the self-signed certificates. This is not my first try getting a real certificate working for my domain, but there is something I cant seem to understand.


Below I have tried to explain exactly what I did in my last try in the hopes that someone will read it and see what I am doing wrong. If there is things in the text that is not relevant, it is simply because I dont know whats relevant here.

Any help I get I will be very great-full for!


This is what I have done on this try:


The VM running owncloud is "ubuntu server 16.04 LTS" and the owncloud install is installed via repos


The domain I own will in this text be "example.com". since I am behind NAT, I have setup a no-ip iddress that I use as the ip for example.com. and I made a www-Forwarder from cloud.example.com to https://example.com/owncloud


I also forwarded ports 80, 443 and 8080 to the ip of the Owncloud VM. cant really remember why I opened the 8080 port tbh.


I can access my owncloud outside my network on both http://example.com/owncloud and https://example.com/owncloud ( I followed a guide for selfsigned cert when setting upp owncloud)


In the VM running owncloud I set the hostname to "cloud.example.com" (I am very unsure what effekt the local hostname has on the setup of certificates, so I tried to keep the same domain just incase it wouldnt work if I chose something else).


after this I did the steps bellow to try and follow this guide: https://manandkeyboard.tk/2015/12/20...-for-owncloud/


Make a directory of your server
1. cd /var/www/html
2. mkdir .well-known
3. cd .well-known
4. mkdir acme-challenge


Update your .htaccess file
5. cd /var/www/owncloud
6. cd /var/www/owncloud
7. sudo nano .htaccess
In the <IfModule mod_rewrite.c> section, add: (I added the text bellow at the bottom of the <IfModule mod_rewrite.c> section)
Code:
    RewriteRule ^\.well-known/acme-challenge letsEncrypt.php
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Copy the Let’s Encrypt code onto your computer using the instructions from “Installing Let’s Encrypt”
9. cd /tmp
10. git clone https://github.com/letsencrypt/letsencrypt
11. cd letsencrypt
Run Let’s encrypt from this directory
12. ./letsencrypt-auto certonly -a manual --email "the mail I registered my domain on here" -d example.com -d http://cloud.example.com

This is where it fails. Giving me this "error code 1":
Code:
rupert@cloud:/tmp/letsencrypt$ ./letsencrypt-auto certonly -a manual --email rupert@example.com -d example.com.no -d http://cloud.example.com
Bootstrapping dependencies for Debian-based OSes...
Hit:1 http://no.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://no.archive.ubuntu.com/ubuntu xenial-updates InRelease                   
Hit:3 http://no.archive.ubuntu.com/ubuntu xenial-backports InRelease    
Ign:4 http://download.owncloud.org/download/repositories/stable/Ubuntu_16.04  InRelease
Hit:5 http://download.owncloud.org/download/repositories/stable/Ubuntu_16.04  Release
Get:7 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]
Fetched 94.5 kB in 5s (17.8 kB/s)                              
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
augeas-lenses is already the newest version (1.4.0-0ubuntu1).
ca-certificates is already the newest version (20160104ubuntu1).
gcc is already the newest version (4:5.3.1-1ubuntu1).
libaugeas0 is already the newest version (1.4.0-0ubuntu1).
libffi-dev is already the newest version (3.2.1-4).
python is already the newest version (2.7.11-1).
python-dev is already the newest version (2.7.11-1).
dialog is already the newest version (1.3-20160209-1).
python-virtualenv is already the newest version (15.0.1+ds-3).
virtualenv is already the newest version (15.0.1+ds-3).
libssl-dev is already the newest version (1.0.2g-1ubuntu4.2).
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic linux-image-4.4.0-31-generic linux-image-extra-4.4.0-31-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
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/rupert/.local/...ncrypt/bin/python2.7 - setuptools pkg_resources pip wheel failed with error code 1
 
Old 08-30-2016, 10:47 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,244

Rep: Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419
A quick google search throws this up:

https://github.com/certbot/certbot/issues/2883
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Testing letsencrypt without a domain? lmcilwain Linux - Security 6 03-03-2016 07:12 PM
LXer: ownCloud Community Comes Up Big Delivering ownCloud 7 Community Edition LXer Syndicated Linux News 0 08-05-2014 06:30 PM
Move owncloud 4 to owncloud 5 to a different server the_bigbalu Linux - Server 2 05-28-2013 01:31 AM
LXer: ownCloud Inc. and the ownCloud community LXer Syndicated Linux News 0 12-16-2011 11:50 AM
Helpt getting internet to work on Slackware 9.1 NomDeGuerre Linux - Newbie 23 12-01-2003 04:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration