How to configure X server to work headless as well with any monitor connected?

I think you missed the Identifier. It works for me when I put :

(...omission of contents)

Section "Screen"
    Identifier    "Default Screen"
    Monitor       "Configured Monitor"
    Device        "Configured Video Device"
    DefaultDepth  24
    SubSection    "Display"
      Depth       24
      Virtual     1920 1080
    EndSubSection
EndSection
2 Likes