Local is PHP's integrated environment Phpstudy, built a site:
Figure A
System files are written like this:
# 102.54.94.97 rhino.acme.com # source Server
# 38.25.63.10 x.acme.com # x client Host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
192.168.1.222:3034 www.yyg.cn
/////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
Scenario: The day before the virtual machine in the configuration of the centos6.3, you can normally surf the internet, and the FTP server to build up, today a boot this goods unexpectedly can not surf the internet, depressed ....
Problem:
The following figure:
Can ping the IP address, but the domain name Ping pass ...
Resolution process: STEP1) A preliminary assessment of DNS problems
Step2) Googlin
Since the last century, my website has been updated much slowly. I don't know what kind of content do you want my website to provide?As we have mentioned earlier, the IP address of the host is Dec through the network domain name.With the continuous in-depth understanding of IPHostEntry Class, we can get the function of searching host domain names using
In the nginx.conf file.The initial time is:server {Listen default_server;server_name www.lnmp.org; ...}Modified intoserver {Listen 80;server_name yoursdomainname; #这里是你自己指定的域名 ...}Then continue adding a section after the last server:server {Listen default_server;server_name _; return 403;}This is a 403 error when receiving IP access or non-specified domain accessCompleteDon't forget to test it with nginx-t
How to bind the ip address and port of the local computer to the custom domain name in the hosts file of the windows system is the php integrated environment PhpStudy, and a site is set up:
The system file is written as follows:
#102.54.94.97 rhino.acme.com # source server
#38.25.63.10 x.acme.com # x client host
# Localhost name resolution is handled within DNS itself.
#127.0.0.1 localhost
1
More :341322.1: howtochangethehostnameofanapplicationstierusing autoconfig 338003.1:How to change the hostname and or port of the Database Tier using AutoConfig341322.1:how to change the hostname of a applications Tier using AutoConfig338003.1:how to change the hostname and or port of the Database Tier using AutoConfigHttp://wenku.baidu.com/link?url=wkJRtPKIlde3VLGSQ4Qq_tu9OC3PkDaDd_hJiAQfpGIgl7fAjAfkUFjtYINcB_ Kzpotk4q0zs10m4e8xrdgaxhbsy-gauv-g34iequ_u0rw N1, stop the application#su –appl01#./s
Solution: ping the ip address in CentOS to ping the Domain Name
Symptom: 1. the domain name cannot be pinged, such as www.qq.com.
2. You can ping an ip address, for example, 61.135.157.156.
Analysis: 1. Check the DNS configuration file/etc/resolve. conf. The server address in the file is incorrect.
2. Modify the
After apache enables htaccess, domain name access does not take effect (ip access is allowed.
What is the cause...
Reply to discussion (solution)
Domain name a1.a.com resolved to Internet IP address 1.1.1.11.1.1.1 ING to intranet 10.10.10.10 . Htaccess contentErrorDocument 404/404 .html The access to 10.10.10.1
Set DocumentRoot directory as:/testThere are two domain names, www.test.com,blog.test.comFirst open the httpd.conf, find the # include conf/extra/httpd-vhosts.conf, remove the previous # number, set the ServerName 192.168.0.1:80Then open your httpd-vhosts.conf, open, writenamevirtualhost 192.168.0.1:80 #这第一段很重要, you must set the current server IPServerName 192.168.0.1:80>ServerAdmin [email protected]Documentroot/testServerName ServerName 192.168.0.1
gateway is set# grep gateway/etc/sysconfig/network-scripts/ifcfg*-------------------------------------------------------------------/etc/sysconfig/network-scripts/ifcfg-eth0:gateway=192.168.40.1-------------------------------------------------------------------Ps:ubuntu 10.3 Cannot find this file, maybe the version is wrong3) ensure available DNS resolution# grep hosts/etc/nsswitch.conf-------------------------------------------------------------------Hosts:files DNS----------------------------
under the Apache directory, as well as admin.demo.com access the Admin folder.admin.demo.comAnd cdn.demo.com can be different domain namesNote in the httpd-vhosts.confThe first VirtualHost配置 priority is the highest, and if the requested address VirtualHost配置 is not found in the other, the default point is to the first, which is often referred to as主服务器VirtualHost *:80 Monitor Any 80-port accessVirtualHost * Listen to any addressVirtualHost 127.0.0.1:
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.