I installed Varnish on my Magento 2 store. All pages such as cart page, product pages, category pages, account pages are working fine and served by Varnish perfectly. The issue is in CMS page such as Home Page, About Page etc. Its giving me 500 errors (Internal Server Error).
Note: This is not the 503 Guru Meditation Page.
I have also checked magento logs which is not giving any hint. The Apache log throws "Premature end of script headers: index.php". Varnishlog also gives nothing except 500 Response.