Web servers play a key role in providing access to online resources. However, they are targeted by a variety of cyber attacks, including DDoS attacks such as Slowloris, which can paralyse servers by draining their resources. This paper investigates methods for detecting and preventing Slowloris attacks in real time. The main focus was on algorithms and tools that can be used to protect web servers. The architecture of streaming and asynchronous web servers, their vulnerability to Slowloris attacks, and recommendations for improving server configuration to minimise risks were analysed. Software has been developed that monitors traffic in real time, detects suspicious activity, and automatically blocks attacking IP addresses using a firewall. The functionality of notifications about attacks via Telegram Bot and logging of events for further analysis has been implemented. The obtained results showed that the developed measures can effectively protect servers from Slowloris attacks, ensuring their uninterrupted operation.