Apache and nginx on same server with multiple IP addresses

02 Nov

In order to get this to work, you need to specify the IP and port each should listen in the domain configuration file (and NOT in the global web-server config).

nginx configuration for a domain (/etc/nginx/sites-enabled/ contains:


Apache configuration for another domain contains:

In this case, this was at the top of /etc/apache2/sites-enabled/

WIth this setup, each web server has its own IP to listen to and they both serve on port 80.

Leave a comment

Posted by on November 2, 2010 in Apache, Linux, nginx


Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: