S
S
ssass702018-10-30 16:25:43
Nginx
ssass70, 2018-10-30 16:25:43

2018/10/30 16:24:04 [warn] 700#700: conflicting server name??

Site not working 502 bad gateway
in logs 2018/10/30 16:24:04 [warn] 700#700: conflicting server name
config:

server { server_name trilliant.host; access_log 

/var/log/access.log; error_log /var/log/error.log; rewrite_log 

on; root /var/www/trilliant.host/public; index index.php; location / { 

try_files $uri $uri/ /index.php?$query_string; 

} 

if (!-d $request_filename) { rewrite ^/(.+)/$ /$1 permanent; 

} 

location ~* \.php$ { fastcgi_pass 

unix:/var/run/php/php7.2-fpm.sock; fastcgi_index index.php; 

fastcgi_split_path_info ^(.+\.php)(.*)$; include 

/etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME 

$document_root$fastcgi_script_name; 

} 

location ~ /\.ht { deny all; 

} 

location ~* \.(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ { expires 

365d; 

} 





} 

server { 

if ($host = trilliant.host) { 

return 301 https://$host$request_uri; 

} 



listen 80; server_name trilliant.host; 

return 404; 





}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris Syomov, 2018-10-30
@kotomyava

You have two server sections with the same server_name trilliant.host, and on the same address and port - listen 80 is the default.
But 502 is most likely due to the wrong path to the socket, or not running php-fpm, for example.
And in general hells some config. =) In addition, it is not completely readable in this form, and not put into the code tag.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question