I am creating a website in which users can log in a share pictures. The problem is, when I type in domain.com/database.sqlite, it shows a bunch of question marks and some of the data stored in the database. How do I prevent this from happening?
You could configure your server as the others suggested but it would be better if you could move the database out of the public directory. That way if you upgrade the server and your settings get changed the database still can't be accessed.