I'm really hoping someone can help me with this. After a lot of searching I haven't been able to find the solution.
I am running my website on NGINX and have Varnish enabled however, when I try to redirect the www version of my domain to the non-www version, it doesn't work and I've tried quite a few different methods.
Here is my configuration file at the moment:
server {
server_name ~^(.+\.)(?<domain>.+\..+)$;
rewrite ^ $scheme://domain.com permanent;
}
server {
listen 8080;
listen [::]:8080 ipv6only=on default_server;
...
..
.
}
When I try to restart NGINX though I get the following error:
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
Anyone know what's up?