I installed and setted up varnish using this guide
Basically, I changed the port to 8080,
I want to disable varnish, so I thought I will change back to port 80 and thats it, varnish it's listening to 8080,
The thing is that I edited:
sudo nano /etc/apache2/ports.conf:
#Listen 80
NameVirtualHost 127.0.0.1:80 # it was 8080
Listen 127.0.0.1:80 # it was 8080
<IfModule ssl_module>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
And then, sudo nano /etc/apache2/sites-available000-default.conf:
<VirtualHost *:80> # it was 8080
The problem was when restarting apache2, I got this error
* Stopping HTTP accelerator varnishd [ OK ]
* Starting HTTP accelerator varnishd [ OK ]
root@funcook:/etc/apache2/sites-available# sudo service apache2 restart
* Restarting web server apache2 AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/ports.conf:6
(98)Address already in use: AH00072: make_sock: could not bind to address 127.0.0.1:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
So I changed back to 8080 and restarting apache fired no errors,
Any idea what am I missing here?
Thanks!
Best Answer
Seems that varnish is listening to port 80.
You can check it by issuing as root:
to see if the port is in use.
If it is, you have to stop varnish (if it is varnish using the port 80 -most probable-) or change it's port and restart.
In other words, in the guide where it says:
the -a option says in which port varnish is listening... and is 80, is not possible both services to open a socket in the same port.
Should be rolled back to Listen *:80 or Listen :80 for being publicly accessible again