In general, after the domain name designated IP, the IP is located in the machine to specify the corresponding site directory, otherwise the domain name will not work;
The following is the details of the NGINX server specified directory under Linux:
The configuration file for the domain binding directory is put here:/usr/local/nginx/conf/vhost/
Under Change directory, create a new file named: Domain name. conf: www.baidu.com.conf
The content might look like this:
server{ listen ; server_name www.baidu.com; Index index.html index.htm index.php; Root /var/www/html/homepage/; CharSet Utf-8; Location ~.*\. (Css|js|swf|jpg|gif|png|jpep|jpg|mp3|xx|xmlbak|xml) $ { expires 720h; } Access_log off; Location ~. *\.php$ { include fcgi.conf; Fastcgi_pass 127.0.0.1:8888; Fastcgi_index index.php; Expires off; Access_log off; }}
Then put your site content into the directory:/var/www/html/homepage/below the line;
Linux under Nginx Server domain name specified directory