Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am curios to know how can we assign different port to Apache and Nginx in 10.10.

I installed nginx first then apache, so when I start my machine, nginx is taking default port: 80.

I have to manually close nginx server and start apache server.

Is there any we can assign different port to them so they will start on different port and will not collide?

share|improve this question
up vote 2 down vote accepted

Edit /etc/apache2/ports.conf with root permission and change Listen value

sudo gedit /etc/apache2/ports.conf

enter image description here

change 80 to 8010, restart apache2 server. Now Your server's url(address) will be

share|improve this answer
shantanu thanks.. – Yogesh Suthar Sep 15 '12 at 5:54

Your Answer


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.