IPv4 addresses will soon be used up, and IPv6 popularization is also an inevitable path. now many VPS service providers have started the IPv6 transition. for example, BurstNet and BuyVM can send Ticket requests for IPv6 addresses to customer service personnel, he.net also provides IPv6Tunnel to indirectly enable VPS to support IPv6. Preparations: ask for the IPv6 address from the BurstNet customer service. you can add the IPv6 address to the customer service Reply. if it is another VPS service provider, please first ask
IPv4 addresses will soon be used up, and IPv6 popularization is also an inevitable path. now many VPS service providers have started the IPv6 transition. for example, BurstNet and BuyVM can send Ticket requests for IPv6 addresses to customer service personnel, he.net also provides IPv6 Tunnel to indirectly enable VPS to support IPv6.
Preparations:Ask for the IPv6 address from the BurstNet customer service. you can add the IPv6 address to the customer service Reply. if it is another VPS service provider, please first ask if it can be added.
1. Add IPv6 module for Nginx
1, first enter the nginx source code decompression directory, the following uses lnmp as an example (after December 10 download do not add, the default already supports IPv6), such as: lnmp0.5/nginx-0.7.67 /, if you forget to put it in that Directory, run the following command:Find/-name "nginx-0.7.67"-type d
2. find the directory and execute:Cd/root/lnmp0.5/nginx-0.6.67/
3. add the IPv6 module to Nginx and run the following command:./Configure -- user = www -- group = www -- prefix =/usr/local/nginx -- with-http_stub_status_module -- with-http_ssl_module -- with-ipv6
4. if there is no compilation error, execute:MakeHoweverDo not make install.
5. after compilation, there is an nginx execution file under the objs Directory. First back up the old nginx file and execute:Mv/usr/local/nginx/sbin/nginx. oldThen, run the nginx cp under the new objs to sbin:Cp objs/nginx/usr/local/nginx/sbin/nginx
6. execute/Usr/local/nginx/sbin/nginx-tUnder the test, no problem is displayed.
7. execute again:Make upgrade
8. execute:/Usr/local/nginx/sbin/nginx-VCheck that the IPv6 module has been compiled.
II. enable IPv6 in Nginx
After Nginx is added to IPv6, run the following command:Killall nginxRun the following command:/Usr/local/nginx/sbin/nginxIt cannot be restarted smoothly.
Modify the configuration of all Nginx virtual hosts. This/usr/local/nginx/conf/nginx. conf also needs to be modified. add the IP address to the listen in all servers {}, as shown below:
Server {
Listen 184.82.232.8: 80;
Listen [2607: f878: 3: 2: 0: 300: 2004: 10]: 80;
Listen [2607: f878: 3: 2: 0: 300: 2004: 11]: 80;Server_name burst-la.vpser.net; index index.html index.htm index. php; root/home/wwwroot;
Some configurations are omitted.
}
Note that the IPv6 address must be enclosed in []. if the customer service has already added an IPv6 address, but you do not know it, run:IfconfigCommand, such:
After modification as required, execute:/Usr/local/nginx/sbin/nginx-tCheck whether there are any errors. if there are no errors, run:Killall nginxAnd then execute:/Usr/local/nginx/sbin/nginxStart.
Open the browser and enter: http: // [2607: f878: 3: 2: 0: 300: 2004: 10.
PS: Your computer needs to support IPv6 and be connected to IPv6. you can use reality like Liufei and freenet6 to support IPv6.
If you have any problems during the installation process, please leave a message in this article or post to the corresponding forum of the vps Forum.
> Reprinted please indicate the source: VPS detective link address: http://www.vpser.net/build/nginx-lnmp-ipv6.html