1

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?

1 Answer 1

3

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.

5
  • 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) May 3, 2013 at 12:45
  • Its actually ports.conf. I updated my answer. Please check that. May 3, 2013 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? May 3, 2013 at 12:56
  • Can you please try this aslamnajeebdeen.com/blog/…? May 3, 2013 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 May 3, 2013 at 13:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .