I actually knew basilisks far before Harry Potter came, as they are pretty common fantasy creatures, and I've played games based on Dungeons and Dragons where they are rather popular. Basilisks are mostly depicted as eight legged lizards though and that is also how they appear in ancient folklore. So I wouldn't call this a potterhead only joke.
Baslisks are also something else in Slavic mythology.
Their roaster lizard things that act like dragons but turn people to stone like Medusa.
There's a legend about one getting itself turned to stone in Poland
That is what the Harry Potter Basilisk has in common with the folklore/myth ones, and also the ones in AD&D.
They are often mixed up with cockatrices which are rooster like creatures with the ability to turn people to stone. Mistranslated jRPGs have often monsters named "basilisk" while they were in fact a cockatrice.