3

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.

4
  • what if you put your ip address instead of * in the VirtualHost ? Oct 26, 2015 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, 2015 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, 2015 at 15:21
  • What is th result of the ommand Apache -S ?
    – Froggiz
    Dec 15, 2015 at 14:39

2 Answers 2

0

This was my problem:

AllowOverride None

should be changed to

AllowOverride All
1
  • Could you please elaborate where did you do such change? Dec 13, 2019 at 13:12
0

For some reasons in Debian GNU/Linux stretch I was able to issue a systemctl start apache2 and seeing it running but not listening. The cause was: the package apache2 was not installed. Really don't know how.

Fixed with:

apt install apache2

You must log in to answer this question.

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