Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am using apache server on ubuntu 11.04. I came to know about Nginx server which has some good features.

So I decided to have a ride on it. But I am little bit confused as I have already installed apache and again I will install Nginx may they conflict each other?

But I came to know that as they both server use different ports so then I can use them.

So my question is how to configure both so that Nginx will not conflict with the www folder where all the projects resides and runs by apache.

share|improve this question
2  
It seems that average SO user tend to downvote on every problem they have no clue of... –  Col. Shrapnel Sep 9 '11 at 18:35
    
Ya I think that. I have a doubt and I asked from the professionals for the best suggestions but still not got –  newuser Sep 9 '11 at 18:38
add comment

migrated from stackoverflow.com Sep 9 '11 at 19:29

This question came from our site for professional and enthusiast programmers.

3 Answers

Change listen 80; in your nginx config to the port that you'd like to use.

share|improve this answer
add comment

Alternative to Shane's answer, if your server has multiple network cards, you could have each listen on a separate ip address.

share|improve this answer
1  
You don't necessarily need multiple NICs. You can bind multiple addresses to a single interface: wiki.debian.org/… –  Gerald Combs Sep 9 '11 at 20:07
    
@Gerald Yes, you're quite right. –  Dana the Sane Sep 9 '11 at 20:10
add comment

There are two aspects to this question:

  1. What IP address and port number Apache and Nginx listen on. Both use the Listen directive for this.
  2. What directory Apache and Nginx serve files from. Apache uses DocumentRoot for this, Nginx uses Root.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.