Changed server detection from doc root to file exists