Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I can't run apache (ubuntu server)

This is my output in terminal:

root@srv etc/init.d/apache2 start
 * Starting web server apache2                                                                                       
apache2: Could not reliably determine the server's fully qualified
domain name, using 2a01:4f8:191:61af::2 for ServerName
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.

How to fix it?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

There is some other program which is running at port 80.

You need to edit /etc/apache2/ports.conf file as follows

replace the line which says

Listen 80

to

Listen 33333

Your apache will be listening for incoming connections at port 33333 now. You can give any port number instead of 33333. Make sure that the port number which you choose is between 1025 and 65535. The ports below 1024 are used by commonly available applications.

share|improve this answer
    
Thanks. httpd.conf was empty default. Now is: Listen 33333 and in etc/apache2/sites-available/mysite I have <VirtualHost *:33333> but still not working. (nginx is running at port 80) –  user2307683 May 3 '13 at 12:45
    
Its actually ports.conf. I updated my answer. Please check that. –  thefourtheye May 3 '13 at 12:49
    
Thanks. Problem with ports solved. Do you have any hint for apache2: Could not reliably determine the server's fully qualified domain name, using 2a01:4f8:191:61af::2 for ServerName? –  user2307683 May 3 '13 at 12:56
    
Can you please try this aslamnajeebdeen.com/blog/…? –  thefourtheye May 3 '13 at 12:59
2  
You can set the server name in /etc/apache2/sites-available/default make this the 1st line ServerName my-epic-server-name-here Oh and by the way you can start apache2 using service apache2 start –  GM-Script-Writer-62850 May 3 '13 at 13:01

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.