Configure multiple domain names and nginx servers for nginx servers
The nginx server supports configuring multiple sites. We can configure sub-domain names to place multiple projects under one domain name.
So how to implement this process?
Many solutions on the Network, some
Recently, a JSP website encountered a session sharing problem. The following describes the details and solutions in a simple example:
The website has two domain names: the primary domain name www.test.com second-level domain name xxx.test.com
1. Use the primary domain na
This article illustrates the implementation method of sharing session data using Memcache mode in the case of thinkphp multiple domain names. Share to everyone for your reference, specific as follows:
First, the origin of the problem
Slightly larger sites, there are usually several servers, each server running different functions of the module, the use of different level two
is stored in a normal file in a specific folder.Then we need to implement a different domain name, only the following two conditions are met:
1) The session data directory of different domain names is unified together, or synchronized update.
2) for the same customer, use a unified session ID
The implementation of the
Shell practice: ping the DNS01 for batch resolution of domain names and ping the DNS02 requirement for batch resolution of domain names: Read the domain name list from a file: 031 read the domain name list file. 04 the format of t
following illustration:
Open the OAMs folder to see the contents of the Web application in it, as shown in the following illustration:
2. Login to remote WebLogic server with Admin account
We've changed the WebLogic listening port to port 80, so log on to WebLogic's console using Http://Ip address/console For example: Http://192.168.1.144/console, As shown in the following illustration:
3. Deploying Web Applications
NAT analysis (intranet users access the server through domain names) 1. environment hypothesis: the private network address of the Intranet server is 192.168.2.20., port 80 of the server is mapped to port 80 of port 202.101.1.1, and the domain name www.sina.com is applied. The IP address of the Intranet PC is 192.168.2.2, now we configure the following command on
PHP regular expressions get domain names from URLs, read PHP regular expressions get domain names from URLs, the following code can get domain names from URLs such as http://souzz.net/html/database/oracle/69613.htmlto souzz.netfun
1. The processing of the adaptive height of iframe under the same domain name
Copy Code code as follows:
Of course here I'm using asp.net MVC where SRC is set to the routing structure
Copy Code code as follows:
Use is the iframe nested pages loaded, use the OnLoad event to get the height of the Web page nested in the IFRAME, and then assign value to the height of the IFRAME can be.
Add one of the following server segments to the Nginx configuration file nginx.conf.
The code is as follows
Copy Code
server {Listen default_server;server_name _;return 404;}Orserver {Listen default_server;server_name _;return 444;}
Nginx's virtual host finds the corresponding virtual host configuration through the host value in the HTTP request, if not found? The nginx will send the request to the specified Default_server node for processing.
Through the
Meaning: Save a space that can be put together
If I loop the following code infinitely, I estimate that I can bind countless stations. Oh, of course, the premise is that your space business allows you to bind countless domain names, good, nonsense less, start writing code!!!!
The steps are as follows:
1, first of all, your space must support ASP, and this space can be bound to use the following two
.
The problem has been disabled. cause: Reply content:
[Modification]I tested it myself and removed the virtual sub-directory from the Wamp \ www directory. For example, I created a new directory to store sub-directories on another disk. This seems to solve the problem, but I still don't know why.
Environment: windows server 2003Software: wamp version 2.4
Current status: the server is normal, and the web Internet can be accessed (through port 8081), both through IP address and
Today in the study of PHP, there is such a requirement: an IP (such as: 127.0.0.1) and multiple domain names (virtual host) binding, the following is my solution:
Solution One: differentiate the different virtual hosts through the ports
① the way to bind a site
1. First Develop your own website (d:/myblog (stored in the D-disk MyBlog directory))
2. Configur
Baidu Web search anti-cheating team on July 19, 2013 released the "sale of two domain name or directory for cheating will be implicated the whole station statement" article, this article I will tell about their own 3 points of understanding and suggestions.
1. Baidu said in the statement: It has been noted that in some forums a large number of high-priced acquisition of two-level domain name or directory i
Since Microsoft released ASP. net mvc and routing engine (System. web. since Routing), we have tried to let us understand that you can fully control the URL and routing. As long as you integrate with your application path for expansion, all problems can be solved. If you need to process data tags in the domain or subdomain, use Default.
Unfortunately, ASP. net mvc is based on virtual directories, but there are various requirements in actual projects.
First, the corresponding a record is determined in DNS,ABC in A 211.154.2.5Mail in A 211.154.2.5
This is about configuring the Apache virtual host under Windows:One, the configuration of virtual host requires 3 files1.apache/conf/httpd.conf2.apache/conf/extra/httpd-vhosts.conf (This ground version of Apache may not have, can be created by itself, or can not be this file,And the configuration directly written in Httpd.conf, written in extra/httpd-vhosts.conf just for the sake of mana
For various reasons, we sometimes need to create multiple web sites on one IP address. In iis5, we may achieve this through simple settings.
In IIS, each webEach site has a unique identifier consisting of three parts for receiving and responding to requests:
(1)IP address(2) Port Number(3) Host header name.
In IIS, multiple independent web sites are created on an IP address. there are usually two methods. This article introduces the Host Header
Today, when learning PHP, there is a requirement: an IP (such as: 127.0.0.1) and multiple domain names (virtual host) binding, the following is my solution:Solution One: differentiate different virtual hosts by port① follow the method of binding a site to prepare1. First Develop your own website (d:/myblog (stored in the MyBlog directory of D-disk))2. Configure t
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
The following actions are established when the APAHCE installation is successful1. Configure the local host.Assuming that the IP on the virtual host is: 192.168.1.51, then the client local host can be configured as: This configures three level two domain names.2. Configure the directory where the corresponding domain
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.