The port 80 vhost of https-only sites redirected everything to https,
including /.well-known/acme-challenge/. Let's Encrypt (dehydrated,
http-01) then had to follow the redirect to port 443. Exclude the
challenge path from the redirect (as already done for redirect sites)
and drop the redundant 'RewriteCond %{HTTPS} !=on' on port 80.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- create_vhost.sh: SFTP_CHROOT_GROUP defaults to 'sftpusers'. Fallback to
'sftpusers' only if a different, non-existing group is configured.
Messages list only the groups actually tried.
- create_vhost.conf.sample: example sshd Match block and default now
use 'sftpusers'.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
create_vhost.sh:
- suEXEC (mod_fcgid) sites get the same chrooted SFTP setup as static
suEXEC sites: web base directory root:root 755, DocumentRoot owned by
suEXEC user/group, SFTP group membership, sshd and chroot path checks.
- SFTP group: use $SFTP_CHROOT_GROUP if it exists, otherwise 'sftpusers'
(if exists). If neither exists, skip that step (group is no longer
created).
fix_sftp_site_permissions.sh:
- Also handle active '*.suexec' vhosts. PHP files (*.php, *.phtml,
*.php5) are not touched there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Users with a non-empty ~/.ssh/authorized_keys are skipped, they would
lose their ssh/sftp access with shell '/usr/sbin/nologin'.
- Finding no suexec users at all is reported as info (exit 0), not as fatal.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A run without changes no longer creates (and removes) a backup file, and
a second run within the same minute can no longer overwrite the backup of
the previous run. Backup timestamp now includes seconds; an existing backup
file is never overwritten.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sets the login shell of all suexec users (SuexecUserGroup in active vhost
configurations) from '/bin/bash' to '/usr/sbin/nologin'.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>