1

I have some problems with apache (OS Ubuntu). for some reasons apache doesn't work on port 80.

For this settings: etc/apache2/ports.conf

Listen 80

<IfModule ssl_module>
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>

etc/apache2/000-default.conf

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
</VirtualHost>

netstat. I try to connect "my_server_ip" or "my_server_ip:80" browser say "connection closed"

If i change port to 8080(for example) and try to connect "my_server_ip:8080" it's work fine and i see default apache page.

settings: etc/apache2/ports.conf

Listen 8080

<IfModule ssl_module>
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>

etc/apache2/000-default.conf

<VirtualHost *:8080>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html
    </VirtualHost>

netstat.

  • what if you put your ip address instead of * in the VirtualHost ? – Pierre-Alain TORET Oct 26 '15 at 14:41
  • did you really started apache services ? any log in /var/log/apache2/error.log ? what is your apache configuration in /etc/apache2/apache2.conf ? do you have another process on port 80 (check netstat) ? – Froggiz Oct 26 '15 at 15:09
  • by the way you need to start apache as root for port 80, port 8080 can be started without being root – Froggiz Oct 26 '15 at 15:21
  • What is th result of the ommand Apache -S ? – Froggiz Dec 15 '15 at 14:39
0

This was my problem:

AllowOverride None

should be changed to

AllowOverride All

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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