我得到的nginx以下錯誤nginx的重複默認的服務器錯誤
: a duplicate default server for 0.0.0.0:80 in /etc/nginx/sites-enabled/default:2
我在/ etc/nginx的/啓用的站點 - /默認的文件是:
server {
listen 80 default_server;
root /var/www/html;
index index.php index.html index.htm;
location/{
try_files $uri $uri/ /index.php$is_args$args;
}
# pass the PHP scripts to FastCGI server listening on /var/run/php5-fpm.sock
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
你有拷貝這個文件作爲另一個域的「模板」嗎? – Gavriel
是的,我已經複製 – Miguel