How to use your own domain name on Win7 and Linux

Source: Internet
Author: User
Tags nginx server

This blog post focuses on how to use your own defined domain name for access on Win7 and Linux.

The Hosts file is a file on the computer used to correlate the URLs you visit and IP resolution, we may want to modify this file on a specific occasion, the XP system with Notepad can open the file modified and then saved, However, under the Win7 system, you need to open it with Notepad under administrator privileges to save it.

The first is to modify the hosts file for Win7

Remember to open Notepad with "Run as Administrator"



Second Open Hosts file


The third modification of the hosts file is as follows

Add a custom domain name for the IP address of my nginx server in the file nanfenglei22


Modifying a Linux/etc/hosts file


In this case, localhost re-alias Nanfenglei22


Restarting the Linux network

sudo/etc/init.d/networking restart


Access your defined domain name under win7

Note: My nginx monitor is on port 8090.


How to use your own domain name on Win7 and Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.