If I want to become a professor, do universities care what field my PhD. is in or just that I have a PhD?
Generally, you're going to need a PhD in a field very close to the one you want to teach in. Many programs make this information available to applicants, and indicate that they are looking for a PhD in field X, Y or Z. This is because these are the subjects where the information and experience that you gain during the course of a PhD are directly relevant to your ability to then teach the subject you are applying for. Simply getting a PhD isn't going to make you much more competitive for a position, unless your PhD shows that you have gained skills directly relevant to the position.

You mentioned the possibility of doing research or getting other certification of your skills, depending on where you want to be a professor, these could be a better option for you. If you can find a university willing to support your research, and get it published, this definitely shows that you have developed relevant skills for teaching in that field. Added to the fact that you have taught at a community college (indicating that you have some ability to perform a CS teaching job), and you have a much more competitive application than you started with.