When handling WebSocket upgrades, Apache and Nginx take different approaches: Apache uses conditional rewrite rules to only send the Upgrade and Connection: upgrade headers when the client actually requests a WebSocket connection, keeping normal HTTP traffic clean and efficient. Nginx, on the other hand, often relies on always setting these headers in proxy configs, which can cause unnecessary overhead or even break normal requests if left unguarded. The key lesson is to handle upgrades conditionally—just like Apache does—so that WebSocket traffic is supported without polluting or disrupting standard HTTP traffic.