Setting up a vhost?

Hi.

I’ve tried to use LE and the problem is having the dns simply routed to my box, and not typing the ip every time.

What am I doing wrong?

Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for xxx.zapto.org

We were unable to find a vhost with a ServerName or Address of xxx.zapto.org.
Which virtual host would you like to choose?
(note: conf files with multiple vhosts are not yet supported)

1: default-ssl.conf | | | Enabled
2: default-ssl.conf | | HTTPS | Enabled
3: plex.conf | | | Enabled
4: default-ssl.conf | | HTTPS |
5: 000-default.conf | | |

Select the appropriate number [1-5] then [enter] (press ‘c’ to cancel): 5
Waiting for verification…
Cleaning up challenges

We were unable to find a vhost with a ServerName or Address of xxx.zapto.org.
Which virtual host would you like to choose?
(note: conf files with multiple vhosts are not yet supported)

1: default-ssl.conf | | | Enabled
2: default-ssl.conf | | HTTPS | Enabled
3: plex.conf | | | Enabled
4: default-ssl.conf | | HTTPS |
5: 000-default.conf | | |

Select the appropriate number [1-5] then [enter] (press ‘c’ to cancel): 5
The selected vhost would conflict with other HTTPS VirtualHosts within Apache. Please select another vhost or add ServerNames to your configuration.
VirtualHost not able to be selected.

IMPORTANT NOTES:

  • Unable to install the certificate
  • Congratulations! Your certificate and chain have been saved at
    /etc/letsencrypt/live/xxx/fullchain.pem. Your cert
    will expire on 2017-08-22. To obtain a new or tweaked version of
    this certificate in the future, simply run letsencrypt-auto again
    with the “certonly” option. To non-interactively renew all of
    your certificates, run “letsencrypt-auto renew”
  • Your account credentials have been saved in your Certbot
    configuration directory at /etc/letsencrypt. You should make a
    secure backup of this folder now. This configuration directory will
    also contain certificates and private keys obtained by Certbot so
    making regular backups of this folder is ideal.

And because of this, I am getting an error that my disk is full? Disk widget broke, and rutorrent is saying its full, even the lsblk is saying 0 available and I have over 250gb free.

what does this give you? lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL

[xxx@ns329388]:(1.3Mb)~$ lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
NAME FSTYPE SIZE MOUNTPOINT LABEL
sda 1.8T
├─sda1 1004.5K
├─sda2 ext4 19.5G / /
├─sda3 ext4 1.8T /home /home
└─sda4 swap 511M [SWAP] swap-sda4

and why/how do you have // and /home/home ? should only be / and /home
also make sure your remove quota and use fix-disk_widget_home

I have no idea really.
Everything was working just fine and it went a bit like this.

> ns3299:/home/username# apt-get -y install git

E: dpkg was interrupted, you must manually run ‘sudo dpkg --configure -a’ to correct the problem.
ns3299:/home/username# ^C
> ns3299:/home/username# sudo dpkg --configure -a
Setting up linux-headers-4.4.0-78 (4.4.0-78.99) …
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-headers-generic (= 4.4.0.78.84); however:
Version of linux-headers-generic on system is 4.4.0.77.83.

dpkg: error processing package linux-generic (–configure):
dependency problems - leaving unconfigured
Setting up linux-image-4.4.0-78-generic (4.4.0-78.99) …
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-78-generic
^CFailed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-78-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-78-generic (–configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-78-generic:
linux-image-extra-4.4.0-78-generic depends on linux-image-4.4.0-78-generic; however:
Package linux-image-4.4.0-78-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.4.0-78-generic (–configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic:
linux-image-generic depends on linux-image-4.4.0-78-generic; however:
Package linux-image-4.4.0-78-generic is not configured yet.
linux-image-generic depends on linux-image-extra-4.4.0-78-generic; however:
Package linux-image-extra-4.4.0-78-generic is not configured yet.

dpkg: error processing package linux-image-generic (–configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-extra-virtual:
linux-image-extra-virtual depends on linux-image-generic (= 4.4.0.78.84); however:
Package linux-image-generic is not configured yet.

dpkg: error processing package linux-image-extra-virtual (–configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-generic
linux-image-4.4.0-78-generic
linux-image-extra-4.4.0-78-generic
linux-image-generic
linux-image-extra-virtual
> ns3299:/home/username# apt-get -y install git
Reading package lists… Done
Building dependency tree
Reading state information… Done
You might want to run ‘apt-get -f install’ to correct these:
The following packages have unmet dependencies:
linux-generic : Depends: linux-headers-generic (= 4.4.0.78.84) but 4.4.0.77.83 is to be installed
E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).
> ns3299:/home/username# apt-get -f install
Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-62 linux-headers-4.4.0-62-generic linux-image-4.4.0-62-generic
linux-image-extra-4.4.0-62-generic
Use ‘sudo apt autoremove’ to remove them.
The following additional packages will be installed:
linux-headers-4.4.0-78-generic linux-headers-generic
The following packages will be upgraded:
linux-headers-4.4.0-78-generic linux-headers-generic
2 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
6 not fully installed or removed.
Need to get 0 B/786 kB of archives.
After this operation, 7,383 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database … 152328 files and directories currently installed.)
Preparing to unpack …/linux-headers-4.4.0-78-generic_4.4.0-78.99_amd64.deb …
Unpacking linux-headers-4.4.0-78-generic (4.4.0-78.99) over (4.4.0-78.99) …
Preparing to unpack …/linux-headers-generic_4.4.0.78.84_amd64.deb …
Unpacking linux-headers-generic (4.4.0.78.84) over (4.4.0.77.83) …
Setting up linux-image-4.4.0-78-generic (4.4.0-78.99) …
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-78-generic
vmlinuz(/boot/vmlinuz-4.4.0-78-generic
) points to /boot/vmlinuz-4.4.0-78-generic
(/boot/vmlinuz-4.4.0-78-generic) – doing nothing at /var/lib/dpkg/info/linux-image-4.4.0-78-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-78-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
Generating grub configuration file …
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-78-generic
Found initrd image: /boot/initrd.img-4.4.0-78-generic
Found linux image: /boot/vmlinuz-4.4.0-77-generic
Found initrd image: /boot/initrd.img-4.4.0-77-generic
Found linux image: /boot/vmlinuz-4.4.0-62-generic
Found initrd image: /boot/initrd.img-4.4.0-62-generic
Found linux image: /boot/bzImage-3.14.32-xxxx-grs-ipv6-64
done
Setting up linux-image-extra-4.4.0-78-generic (4.4.0-78.99) …
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-78-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
Generating grub configuration file …
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-78-generic
Found initrd image: /boot/initrd.img-4.4.0-78-generic
Found linux image: /boot/vmlinuz-4.4.0-77-generic
Found initrd image: /boot/initrd.img-4.4.0-77-generic
Found linux image: /boot/vmlinuz-4.4.0-62-generic
Found initrd image: /boot/initrd.img-4.4.0-62-generic
Found linux image: /boot/bzImage-3.14.32-xxxx-grs-ipv6-64
done
Setting up linux-image-generic (4.4.0.78.84) …
Setting up linux-headers-4.4.0-78-generic (4.4.0-78.99) …
Setting up linux-headers-generic (4.4.0.78.84) …
Setting up linux-generic (4.4.0.78.84) …
Setting up linux-image-extra-virtual (4.4.0.78.84) …
> ns3299:/home/username# apt-get -y install git
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-62 linux-headers-4.4.0-62-generic linux-image-4.4.0-62-generic
linux-image-extra-4.4.0-62-generic
Use ‘sudo apt autoremove’ to remove them.
Suggested packages:
git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch git-cvs
git-mediawiki git-svn
The following packages will be upgraded:
git
1 upgraded, 0 newly installed, 0 to remove and 31 not upgraded.
Need to get 3,068 kB of archives.
After this operation, 12.3 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 git amd64 1:2.7.4-0ubuntu1.1 [3,068 kB]
Fetched 3,068 kB in 0s (8,921 kB/s)
(Reading database … 152328 files and directories currently installed.)
Preparing to unpack …/git_1%3a2.7.4-0ubuntu1.1_amd64.deb …
Unpacking git (1:2.7.4-0ubuntu1.1) over (1:2.7.4-0ubuntu1) …
Setting up git (1:2.7.4-0ubuntu1.1) …

After installing git, the upper part is there and I’ve checked the rutorrent saying my disk was full. Moments before, I have around 273GB free.

hard to say where you messed up… but git should have been installed if qb was installed

I have no idea. Everything was working perfect to be honest and then this. Should I restart it?

i guess you could try to reboot but not sure whats wrong so not sure how reboot would help.
most likely you ran out of space in /

I checked the space before lsblk and it was in line with what the widget was saying.

I haven’t downloaded anything in that time, nor it was possible for me to download 250GB in a matter of minutes.

─sda2 ext4 19.5G / /

ns3299:/home/username# du -hs /home
1.5T /home

if you run out of space in / things break
as your system needs room to think.

> ns329:/home/username# lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 1004.5K 0 part
├─sda2 8:2 0 19.5G 0 part /
├─sda3 8:3 0 1.8T 0 part /home
└─sda4 8:4 0 511M 0 part [SWAP]
> ns329:/home/username# du -hs /home
1.5T /home
> ns329:/home/username# df -h
Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 2.0G 0 2.0G 0% /dev
tmpfs tmpfs 394M 8.2M 386M 3% /run
/dev/sda2 ext4 20G 5.3G 13G 30% /
tmpfs tmpfs 2.0G 12K 2.0G 1% /dev/shm
tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/sda3 ext4 1.8T 1.5T 278G 84% /home

I have 278GB free as expected, but lsblk is showing 0 free.

I’ve ran the updated in the QB Gui and it installed quotas. Removed them and it is showing properly now in the widget. I have 277GB free. LSBLK is showing 0, but who cares.

Anyway, how do I deal with the vhost situation? Would like to start with LE :slight_smile:

update does not install quota :stuck_out_tongue:

idk i use box install letsencrypt
works everytime

I would assume, but something happened since I started all those that triggered it.

Anything on the vhost thing?

apache configs not really my thing sorry.

What is the output of cat /etc/apache2/sites-enabled/default-ssl.conf
I am really only interested in the SSL entries towards the bottom.

SSLCertificateFile 
SSLCertificateKeyFile 

Also, judging by some of that failed mess above in your apt update process, will you please do apt autoremove && apt autoclean, followed by apt -y update && apt -y upgrade.

Then attempt to install the certificate for your domain (which you should already have) with box install letsencrypt. Make absolutely sure that if you are using CloudFlares DNS, you have the routing for caching etc. turned off (just make sure the cloud is grey and not orange)