I have tried to change the port in which nginx listens for from 80 to 6000. However I get this when I try to restart it.
Restarting nginx: nginx: [emerg] bind() to 0.0.0.0:6000 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:6000 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:6000 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:6000 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:6000 failed (98: Address already in use)
nginx: [emerg] still could not bind()
This is my sites-enabled setup.
server {
listen 6000; ## listen for ipv4; this line is default and implied
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
root /var/www/mywebsite.co/html;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name mywebsite.co www.website.co;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.html;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
location /doc/ {
alias /usr/share/doc/;
autoindex on;
allow 127.0.0.1;
allow ::1;
deny all;
}
}
I have a feeling the 0.0.0.0:6000
should be the ip address in which the server is held on e.g 192.168.1.3:6000
however I am not sure how to do this. Any help would be appreciated thanks.