This article describes how Apache implements a local generic domain name virtual host. Share to everyone for your reference, specific as follows:
Create a generic domain name virtual host locally, you can modify the Apache installation directory under the Conf/httpd.conf, as follows:
Restart Apache, you can u
, this paragraph in the document is not, and then look down, return to the default is the host mechanism, and any host access,
In this case, we can use the domain name binding to run the Tornado application, and support multi-domain name, because that is a string of regular, on the basis of the example just added a
Look at all this title do not be surprised, we use the ixwebhosting host to achieve two independent sites with a top-level domain name and a domain name with the WWW set up. In no separate station on the optimization with the WWW and no www difference is very large, such as snapshots without the www to be faster, included also more. So how do we achieve this
One server installed Apache, how to bind multiple domain names and website content? The simplest way of course is to have different stations with different ports. However, you need to add a port number after the domain name to access it, not directly to the domain name. Another way is to use the host header to virtual
Hostname configuration/etc/sysconfig/network hostname can not be changed to the form of the domain nameShell>vim/etc/sysconfig/networkNetworking=yesNetworking_ipv6=noHostname=mail1.gz.comLocal domain name resolution configuration is often used for testing, of course, in a system of their own internal use is also very commonShell>vim/etc/hosts192.168.2.10 mail1.gz.com192.168.2.20 mail2.gz.comDNS configuratio
apache2.2.x version1. Note The doucumentroot in the master configuration file/etc/httpd/conf/httpd.conf" /var/www/html "2. Remove the main configuration file namevirtualhost the previous comment, add the local host name192.168. 136.131:3. If the servername is commented, or the default is localahost:80 or 127.0.0.1:80, it will be an error, but does not affect the use of the virtual host" stopping httpd:
Sometimes, for convenience, security, and speed, we place the uploaded files on a single host and use a second-level domain name for access. but how does PHP put the uploaded files on another host? This requires cross-host Upload. now we use instances to show you how to implement this function. how to cross-
During web development, you usually need to access websites in the local environment using http: // localhost or 127.0.0.1. However, if there are more websites on the local machine, you have to perform other operations, such as port settings. The results are hard to remember.
I am using a local ubuntu + nginx environment. nginx allows multiple domain names to be set. You only need to point to different storage locations. Then, how should we set a
This article describes how PHP can obtain parameters such as the current host, domain name, URL, path, and port, if you are interested, please refer to this article. This article describes how PHP can obtain parameters such as the current host, domain name, URL, path, and port.
Lab environment:
The test
1 httpd.confOpen ithttpd.confSearch for Characters "# Virtual hosts, remove the comment from the following line as follows. The aim is to makeApacheLoad after reboothttpd-vhosts.confFile. 2 Openconf/extra/httpd-vhosts.confNamevirtualhost *:80//enable domain-based virtual hosts, if not, only the first oneVirtualHostThe configuration item will take effect. [email protected]. com/webmaster mailbox.DocumentRoot "D:/apache2.2/docs/ok"//Virtual
This is my real thing. I started buying their company's domain name, virtual hosting and other products before 10.First say virtual host: Often crash, replace the IP address, replace the address also forget, also silently change, there will be no mail, not to mention SMS notice you;Domain name: I bought them a company's domai
Apache's virtual hosting service means that a machine is virtualized into multiple Web servers. Specifically, we can use the virtual hosting service to assign two domain names to the same server, and visitors can access them as long as they enter the domain name. For example, in this machine, we configure www.aaa.com and www.bbb.com. Domain-based virtual hosting
Although we have been able to access the local site through localhost, in order to improve the grid, we can modify the host file, set a favorite domain name to point to the local site, it is not more tall.Clear requirementsThe configuration allows us to access the local Web site via http://a.com.Modify HostWindows users inC:\Windows\System32\drivers\etcThe file named hosts is found in the directory. Due to
Today I studied how to bind multiple domain names to a single host in Apache and use port 80. To put it bluntly, multiple websites are run on one host, and the website domain names are all port 80.
The specific method is as follows:
1. Go to the Apache conf directory and find httpd. conf. For example, my directory is c
If there are two domain names, respectively hello.abc.com and play.abc.com, you need to bind these two domain names toIP is 219.13.34.32 on the server1. First you need to specify the domain name and IP correspondence in the Domain Name Vendor Management page2.WEB Server Configuration Good lamp environment3. Put the cor
Extraterrestrial virtual host platform has included a new network, the new network interconnection, business China, China Channel, million network domain name registration interface, so the setting is very simple.
Platform can be set up a different query interface and registration interface, that is, you can use the interface of the new network query, with the interface of the million network registration,
1. Agents can not use their own online payment interface. The current financial structure is that each sum is a true amount, that is to say, the agent's account of the money, in the administrator there should be the bank records remitted. If the agent can use its own interface, it will cause money to import agents there, if allowed to do so, will create a "virtual money", such as agents to the name of the user borrowed 10,000 yuan, if agents do not act as agents, the money end users can only fin
Host command
Function descriptionThe host command is a common domain name query tool, and the nslookup, dig functions are basically the same, using the following:
host [parameters] [options]
Common parameters
Options
Description
-A
Querying DNS deta
Similar to the Apache virtual Host configuration under Windows platform, the only difference here is that the apache2 (installed through Apt-get) in Debian is in/etc/apache2
This article a space to teach you to implement multiple IP based on 127.0.0.* (Common network IP) to control the local virtual host, B space to teach you to implement a virtual host based on
To implement three types of virtual hosts need to modify the code under Http\server in the Nginx nginx.conf file, share two ways to configure a virtual host:
# domain-based virtual host
server {
listen; # Listen to the Port
server_name a.com, listen to the domain name, note that localhost is also a
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.