1.powerdns settings
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6F/60/wKiom1WaTfqB55koAAHs-TR85D0250.jpg "title=" Qq20150706174216.jpg "alt=" Wkiom1watfqb55koaahs-tr85d0250.jpg "/>
2. Internal website Introduction
Web server using Nginx, intranet DNS using Powerdns.
The functions you want to implement are as follows
Jump to the A page via IP access, and let it jump to page b when accessed via the domain name. Both methods have a port of 80.
Page A corresponding Nginx configuration
server {
Listen 80;
server_name localhost;
#charset Koi8-r;
CharSet Utf-8;
Access_log Logs/localhost.access.log Main;
Error_log Logs/localhost.error.log;
root/var/www;
Index index.php index.html index.htm;
AutoIndex on;
Autoindex_exact_size off;
Autoindex_localtime on;
Location/{
}
Page b corresponding Nginx configuration
server {
Listen 80;
server_name Zhidao. aaa.com;
#charset Koi8-r;
CharSet Utf-8;
Access_log Logs/localhost38.access.log;
Error_log Logs/localhost38.error.log;
Location/{
root/var/www/q2a/question2answer-1.7;
Index index.php index.html index.htm;
AutoIndex on;
Autoindex_exact_size off;
Autoindex_localtime on;
}
After configuration, restart Nginx,
[Email protected] conf]#/usr/local/nginx/sbin/nginx-s Reload
3. Testing
Access via IP
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/60/wKiom1WaUMPBHSsvAAEYwD4HT28683.jpg "style=" float: none; "title=" qq20150706175520.jpg "alt=" Wkiom1waumpbhssvaaeywd4ht28683.jpg "/>
Access by domain name
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6F/5E/wKioL1WaUtmw_ivFAAIiXjq1Bho962.jpg "title=" Qq20150706175425.jpg "alt=" Wkiol1wautmw_ivfaaiixjq1bho962.jpg "/>
As you can see, the two jump to different pages, respectively.
Powerdns and Nginx in combination with the domain name and IP access to the Web server 80 port when jumping to different pages