Tus comentarios
Thanks for the explanation, useful.
The weird thing about that is that I have another website with a similar server conf that doesn't generate the same issue. The port 80 is defined in the "Ports" tab and in the "Advanced" one.
server {
listen 80;
server_name www.example.com;
return 301 http://example.com$request_uri;
}
server {
listen *:80;
server_name example.com;
(...)
Would it be correct to never include port 80 in any website "Ports" screen and specify ports only when using https, for example?
I can see some useful cases, even if it's not for reselling hosting. If you want to give a friend a FTP access to your server, you don't always want to give your own credentials.
Alright, thanks.
Yes.
So, what can I do? Just ignore these warnings? I don't quite like that. ^^
So, what can I do? Just ignore these warnings? I don't quite like that. ^^
It returns this:
nginx: [warn] conflicting server name "domain.com" on 0.0.0.0:80, ignored nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
Here you are:
#AUTOMATICALLY GENERATED - DO NO EDIT!
server {
listen 80;
server_name domain.com;
return 301 https://domain.com$request_uri;
}
server {
listen *:80;
listen *:443 ssl spdy;
ssl_certificate /etc/ssl/domain_com.crt;
ssl_certificate_key /etc/ssl/domain_com.key;
server_name domain.com;
access_log /var/log/nginx/domaincom.access.log;
error_log /var/log/nginx/domaincom.error.log;
root /srv/domain.com;
index index.html index.htm index.php;
location = / {
rewrite ^ http://anotherdomain.com permanent;
}
location ~ [^/]\.php(/|$) {
fastcgi_index index.php;
include fcgi.conf;
fastcgi_pass unix:/var/run/php-fcgi-domaincom-php-fcgi-0.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
It gives an Nginx error, that's why I thought that there is a bug somewhere.
The code above gives this error:
If I remove
The code above gives this error:
nginx: [warn] conflicting server name "example.comt" on 0.0.0.0:80, ignoredIf I remove
server { and } it becomes: nginx: [emerg] "listen" directive is not allowed here in /etc/nginx/conf.d/examplecom.conf:4Servicio de atención al cliente por UserEcho
I found part of the answer. It looks like people often call this "plus addressing" and use this in
exim.conf:I took a look at
exim4.confand other .conf files but I often see "#--AUTOMATICALLY GENERATED - DO NO EDIT!". I tried to modifyexim4.conf.templateorupdate-exim4.conf.confthen runupdate-exim4.confbut it looks like my edit are not used.Do you have an idea about how to make this work? :)