Nginx Multiple Domains

Configure Multiple Domains

1
$ sudo vim /etc/var/nginx/conf.d/multiple.conf
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
server{
	listen 80;
	server_name aaa.com;
	index index.htm index.html index.php;
	root /home/aaa;

	error_page 404 /404.html;
	error_page 500 502 503 504  /50x.html;
	  
	error_log /var/log/nginx/aaa.error.log;
	access_log /var/log/nginx/aaa.access.log;
}
1
2
$ nginx -t
$ nginx -s reload
Licensed under CC BY-NC-SA 4.0
comments powered by Disqus