摘要 |
One embodiment of the present invention provides a system for isolating virtual hosts on a network server device. During operation, the system creates a container for a virtual host of a plurality of virtual hosts of a web server running on the network server device. A respective virtual host of the plurality of virtual hosts represents a website running on the web server. If the system receives a web request for a dynamic resource from a client, the system identifies the virtual host as associated with the web request. The system then runs a script interpreter process for generating the dynamic resource in the container and sends a response message comprising the dynamic resource to the client. |