I'm on Ubuntu and using LAMP for local dev. I've several WordPress installations for different project and tried to set custom permalinks on all of them, but only default permalink setting ( http://localhost/wpinstalation/?p=123 ) works, other settings are giving 404 error. Any idea how can I fix this?