A web site is usually composed of a domain name and a bunch of web page files:
Domain name: is "Three tatsu don't slip what point pit" Such things (such as www.yihui.name, not strict, see something), administered by a nonprofit organization, ICANN, but it authorizes a number of Registrars (registrar) to sell domain names, and you can register them with the top-level domain names , the so-called top-level domain name is "letter or number combination + top-level domain name suffix", these suffixes include common com/org/net, also include uncommon name/info/biz, etc., the domain suffix that allows the registration of each family may be different, this looks like a person likes About the domain name suffix, originally it has meaning, such as com is company,org is organization,name is a personal domain name, and so on, but I personally think these things have not much meaning, domain name as long as good remember, look at the Smarty pants can be, Whether it is a company or an organization (there are exceptions: such as the special suffix of the General people can not register), the famous del.icio.us website is a good example, it does not have to be the United States website, but this domain name is very clever registration. Under the top-level domain name can be set sub-domain name, such as level two three domain name, strictly speaking, Www.yihui.name is only yihui.name two sub-domain, but www too popular, so that people simply put
www.***.*** is considered a top-level domain. Animation.yihui.name is a sub-domain/sub-station of this site. Said a long, domain name how to register AH? You google a "domain name registration" or "Domain name registration", the top sponsored link is a strong registrar, but I as an experienced to seriously remind that, try to do not register in the country (especially don't trust the nonsense of the million-net). It is said that GoDaddy can also, I have not tried, only know that it does not seem to register. Name Domain name, I am the domain name registered in name.com (need to pay USD, I use PayPal, dual currency credit card can also).
Website space: Think simple, space and your hard disk no difference, but is a space service provider sold you a piece of server hard disk location, performance may be better than your PC, site space is to put the Web page files, Web files you can simply imagine as your hard disk files, they are also accessed by the path, The path to the URL corresponds to the folder on the hard drive. Web page files are usually divided into:
Static Web page: its content is fixed, with HTML code (a language of the Web page), regardless of who, regardless of time access, the content is the same, usually with. html/.htm as the file name
Dynamic Web page: I estimate that most of the sites are dynamic now, so-called dynamic is the Web file will be based on different conditional parsing generated different HTML code, for example: a dynamic page According to the time and user ID say hello to the visitor, morning visit said Good morning, evening visit said Good evening, Passers-by came to say hello to passers-by ... Dynamic pages are usually linked to the database, and when the user accesses the Web page, the Web program accesses the database, so the page content is constantly updated. Dynamic pages may be written in different languages, such as the old Microsoft ASP, the popular open source PHP. Now there are countless web sites on the network, I certainly respected php+mysql system, at present, especially optimistic about the WordPress system.
Ii. about the configuration of the website 1, the setting of the domain name
Registered domain name after the silver, the domain name is yours, if you are registered in the country, you pay to buy the domain name is not really your. Be sure to see if you have the following rights:
Modify registered contacts, management contacts, technical contacts and paid contact information, if you can not find in the background changes in the place, then congratulate you, this domain name seems not you, but a dishonest businessman, use Whois to check the domain name information it;
Get the Authorization Code (AUTH code), there is also called the Domain name transfer password, this code is very important, if you do not know or unscrupulous businessmen do not tell you, that again congratulations, this domain name is still not yours, want to move to another registrar can not move, in case you do not encounter this situation, then go to ICANN complaints merchants, Complain three times a day, if a registrar is always complained, ICANN will fix it, and you must know what your rights as a consumer are.
The domain name is set up primarily with some parsing work, including:
NameServer (name server): Usually the kind
ns*.***.*** of URLs, this server is responsible for resolving the following various settings, that is, it is the domain name of the boss of the settings. Some of the domestic domain name registrars usually use this as a means to get stuck with users, such as restricting your only domain name servers, and then restricting you to set up up to 10 A records or MX records, and so on, this is a very ridiculous rule, especially for those who need more subdomains, this is very inconvenient , the situation is better abroad, at least I have not seen any restrictions on your use of a specific domain name server;
A special mention is that some space service providers only need you to set the domain name server as their domain name server, all the remaining resolution problems you basically do not have to control, you can freely create subdomains, without having to add a record
A record: is to point the domain name to the host IP, you can point the top-level domain name or sub-domain name to a specific IP, so your sub-domain name and top-level domain name can not be on the same server, For example, I can point www.yihui.name to 18.104.22.168, Test.yihui.name to 127.0.0.1, and so on.
MX record: Is the mail server, you know
***@***.*** the form of the mailbox, when you send the mail point "sent", first of all your mail service provider to find its MX record according to the domain name of your recipient's mailbox, and then send the mail to the corresponding (another) mail service provider, For example, my domain name Yihui.name's MX record is aspmx.l.google.com, that is, GOOGLE apps mail Service address, when you send [email protected] e-mail, System first to look for Yihui.name MX record, a look, oh, Google Ah, then the delivery to Google home, Google received mail, a look, oh, to send to the Xie user Ah, then sent to the Xie Inbox it; I remember the sogou seems to have provided free mail service, I do not know that it is still not in, I've been using Google Apps for a long time.
CNAME: Alias, this thing is a domain "mask", For example, if I set Google.yihui.name's cname to google.com, then you actually visit Google when you visit the former, and any path contained in the domain name will be passed to google.com intact, such as Google.yihui.name /services/is accessing google.com/services/, but the address in your browser's address bar does not show the latter, but instead displays the "masquerading" address. So as long as I am happy, I am free to make news, such as "Google changed the URL, the new URL is http://google.xiexie.name."
Other settings: Don't say, theoretically a record is enough, nothing else.
2, the host settings
After the domain name has been set up, the host also needs some echo work. If the domain name is set to a record, but the host does not "receive", the website also cannot use. Host how to receive depends on its installed website service program, now popular is Apache, of course, there are a few sites still holding windows IIS thigh (with ASP language +access database), it is said that in recent time a new software, there is the possibility of replacing Apache, the name has been forgotten. Take Apache for example, the host will create a virtual host configuration file, tell the server, "Hey, there is a website point to you, you want to serve this site, this site in a directory, if users visit a URL, You are responsible for taking the files out of the directory to the user to see. "The general principle is this, the details are not much to say."
For the user, do not care so much detail, the above principle of implementation for you is in the background to bind the domain name to the host directory (and sub-domain name binding to subdirectories). In general, the site needs two additional tools to allow the owner to configure their own site, that is, FTP and database.(1) Transferring Web files with FTP
FTP is used to transfer files to a certain server, as long as you purchase a virtual hosting service, you will generally give you an FTP account, you can use this account to log in to your host, the Web page files, and then users can access. A little common sense is that index.htm/ index.php such as web files is usually when you access a directory when the host will automatically find the files for you, such as you visit Yihui.name, the host will automatically find there is no index.php, if there is, execute this file, generate HTML to your browser. The file name may be configurable, but it is not recommended to be a maverick.
Now a lot of mature station system, downloaded from the Internet and then uploaded to the server, access to your Web site, follow the prompts step by step configuration, with the installation of software is no different.(2) Website database
Most dynamic sites require a database (even a text file "database"), and if your website is in PHP, then MySQL is perfect. If the Php+mysql space (the General Linux host is this), the host will assign you the MySQL database account number, including: Database host (mostly localhost), database name, user name, password. These four items will require you to fill in the process of installing the Web application.Third, the operation of the website
For those programmers, the first example is usually Hello world, and if you want to see Hello World, write "Hello World" with any text editing tool in a text file. Named index.htm (Note that Windows hides the file name extensions by default!) You make sure the file name is not index.htm.txt, I don't care, upload to the root of the website, and then visit your website, you can be delighted to see this old no longer old Hello world.
A decent website is certainly not Hello world so simple, it runs like a complex program, there may be function calls between files, database access and so on. The world really develop the website program is certainly a few people, so do not worry, you use other people's program it, typical web system has:
Blog System (blog): Recommended WordPress, the reason is that the program is written concise, strong extensibility, I used to use domestic bo-blog system, and later did not have to live the temptation to go to WP
Content Management System (CMS): News gossip station, tutorial station, and so on, as the name implies is filled content, this site probably is to copy each other, not a few serious write, so in order to alleviate the pressure of reading, please Sir Cherish life, away from this site, also do not repeat the construction
Forum System (BBS): Netizens should be very familiar with this, the domestic common system has phpwind, discuz, foreign flourished has phpbb, I personally recommend a relatively new debut bbpress, the reason with WordPress, In everyone desperately to increase the functionality of today (make users face a lot of options to burn), rare to see a desperately reduced function of the forum system
Wiki: Wikipedia uses the MediaWiki system, and if you don't want the wiki to interact with the database, DokuWiki will be a good choice, it doesn't require database support, it's all text file operations.
Buy domain names, avoid unscrupulous businessmen, suggestions through your familiar friends introduced, not on Google; if you buy abroad, you can pay by credit card or PayPal that supports US dollars, and the domain name is paid every year.
Buy virtual hosting space, avoid unscrupulous businessmen, recommend through your familiar friends introduce, not also do not feel free Google, because space performance is very important, do not try not to know, according to your site needs to buy the space (static? Dynamic? How big does it take? ), domestic divided into different types of space, may be charged by size, foreign according to my understanding of the hostmonster is no size limit, a price, open let you casually use, of course, will always be limited by the size of the hard disk
Set up a domain name server or a record, point to host
Upload the Web page file via FTP and visit your new website
Configure your site, you can usually log in to the site background for settings, usually do some daily updates, see the function of jealousy can also DIY out
If you have to buy a virtual host in my wise Shenwu, then congratulations you still have the most important step is to go to the wise Shenwu of the public Peacemaker department there to prepare a bird case, the record Web site search it, whether you can prepare your own incense, I do not care, a day do not record, a day site should not run, the host service will put you
Set up a full set of processes and detailed explanations of the site