It seems that the issue in my case is that some files that are set up as log files for some of the virtual servers, don't exist.
I've figured it out by removing "> /dev/null 2>&1" in the lampp script in the line that stops apache.
$ sudo /opt/lampp/lampp stop
Stopping XAMPP for Linux 1.8.3-1...
XAMPP: Stopping Apache...(2)No such file or directory: AH02297: Cannot access directory '/home/teo/Documents/DATA/progetti/sandscapes/logs/' for log file '/home/teo/Documents/DATA/progetti/sandscapes/logs/access.log' defined at /opt/lampp/etc/extra/httpd-vhosts.conf:66
AH00014: Configuration check failed
fail.
apachectl returned 1.
However, there are a couple of issues to be fixed here.
1) such a thing shouldn't prevent you from STOPPING apache. That's ridiculous. I'm not sure to which extent this is an issue in xampp and to which extent this is an issue in apache itslef. But at the very least, you should be given the option to kill apache if stopping it gently fails, and this certainly can be done in xampp.
2) the lampp script should be improved so that, in cases like this, more information about the error is shown. Getting a generic "fail. apachectl returned 1" message is not enough. Being told that something has failed without the smallest bit of information about _what_ has failed is something terribly irritating. Instead of throwing the error stream to /dev/null, save it somewhere and then discard it only if everything goes well.