Troubleshooting
Nginx Issues
Configuration test fails
sudo nginx -t
Check the error message for syntax issues. Common causes:
-
Missing semicolons in config directives
-
Invalid SSL certificate paths
-
Port conflicts with other services
403 Forbidden on WebDAV
-
Check directory ownership:
# Debian ls -la /var/www/html/webdav/ # Should be owned by www-data:www-data # CentOS ls -la /var/www/html/webdav/ # Should be owned by nginx:nginx -
Check SELinux (CentOS only):
sudo setsebool -P httpd_can_network_connect 1 sudo chcon -R -t httpd_sys_rw_content_t /var/www/html/webdav/
DAV module not found (CentOS)
If nginx -V does not show http_dav_module:
-
Verify the module file exists:
ls /etc/nginx/modules/ngx_http_dav_ext_module.so -
Check that
nginx.confhasload_module modules/ngx_http_dav_ext_module.so;as the first line -
Rebuild the module if Nginx was upgraded (version must match)
FTP Issues
530 Login incorrect
-
Verify user is in the whitelist:
grep username /etc/vsftpd/user_list -
Verify
pam_shells.sois commented out:grep pam_shells /etc/pam.d/vsftpd # Should show: #auth ... pam_shells.so -
Verify the user exists and has a password set:
id username sudo passwd username
SSL Issues
Certbot fails to obtain certificate
-
Ensure port 80 is open and accessible from the internet
-
Ensure the domain A record points to the server IP
-
Check rate limits: Let’s Encrypt has a limit of 5 duplicate certificates per week
General
View logs
# Nginx
sudo tail -f /var/log/nginx/webdav-*-access.log
sudo tail -f /var/log/nginx/webdav-*-error.log
# vsftpd
sudo tail -f /var/log/vsftpd.log
# System journal
sudo journalctl -u nginx -f
sudo journalctl -u vsftpd -f
Files uploaded via FTP not visible via WebDAV (or vice versa)
Both services must point to the same directory (/var/www/html/webdav/). Verify:
# Check vsftpd user config
cat /etc/vsftpd/users/<username>
# Should contain: local_root=/var/www/html/webdav/
# Check Nginx config
grep "root" /etc/nginx/conf.d/default.conf # CentOS
grep "root" /etc/nginx/sites-available/default # Debian
# Should contain: root /var/www/html/webdav/
If file permissions differ, reset ACLs:
sudo setfacl -R -m u:www-data:rwx /var/www/html/webdav/ # Debian
sudo setfacl -R -m u:nginx:rwx /var/www/html/webdav/ # CentOS