Apache Configure virtual host three ways, Apache virtual host
One, IP-based
1. Assume that the server has an IP address of 192.168.1.10, use Ifconfig to bind 3 IPs on the same network interface eth0:[Root@localhost root]# ifconfig eth0:1 192.168.1.11
[Root@localhost root]# ifconfig eth0:2 192.168.1.12
[Root@localhost root]# ifconfig eth0:3 192.168.1.13
2. Modify the Hosts file to add three domain names to
Hu Xi, "Apache Kafka actual Combat" author, Beihang University Master of Computer Science, is currently a mutual gold company computing platform director, has worked in IBM, Sogou, Weibo and other companies. Domestic active Kafka code contributor.ObjectiveAlthough Apache Kafka is now fully evolved into a streaming processing platform, most users still use their core functions: Message Queuing. For how to ef
This article is used as a working record and needs to be referenced by a friend. CENTOS7 Installation lamp Environment Tutorial Http://www.osyunwei.com/archives/7882.html After the installation is complete, you need to configure multiple project deployments for multiple virtual host users. Vi/etc/httpd/conf/httpd.conf Edit the DocumentRoot directory address can be used to specify their own convenience, where I specify the habits of their own. Do not define to the user directory (root), otherwise
Apache,apache Optimized reading:2516Time: 2011-01-04 12:07:30 font: [Big small]Apache2.0 PREFORK.C module and WORKER.C moduleIdle child process: Refers to a child process that is not processing a request.1. PREFORK.C Module (a non-threaded, pre-derived MPM)Prefork MPM uses multiple child processes, with only one thread per child process. Each process can only maintain one connection at a certain time. On mo
Sometimes we will hide the server information in order to avoid malicious attacks from a security standpoint, for example, we will find the following information in general.I'm using CentOS (Fedora, rhel as well)sudoOther systems (Ubuntu, Debian)sudoWe can add two lines of information to this file//隐藏Apache版本信息ServerTokens Prod//第一条命令虽然不会在页面上直接显示,但在response的头部还会包含,所以加上此条。And then restart the network.$ sudo service apache2 restart (DebianUbuntuorLinuxM
the difference between Apache Ant and Apache mavenCategory: ANT Maven 2013-12-10 18:47 1477 people read review (+) collection report ——— from the Maven authoritative guideApache Ant1. Ant is programmed, and you have to tell ant exactly what to do and when to do it. You have to tell it to compile, then copy, and then compress. 2. Ant does not have a life cycle, you must define the dependencies between go
In Windows, the entire process of solving the loss of Apache + PHP sessions is recorded, and apache is recorded.
Today's job is to migrate a PHP site to the new server.
Create a Windows Server 2008 Virtual Machine and stop the net stop http service on it (avoid competing for port 80), install and configure Apache + PHP, migrate the site to the new Server, and o
Linux: deploy apache configurations for multiple projects on an apache server.
Step 1:
Get the code to the/var/www/html directory (this is the default directory, depending on apache settings). Multiple projects can be stored in this directory, for example:
[Root @ www html] # pwd/Var/www/html[Root @ www html] # lsBossmail.cn bossq.cn oem ydj.org yzhantong
Step 2:
The maximum number of connections for Apache, which defaults to 256.
Modify the maximum number of connections for Apache as follows:
Step One
Modify the/path/apache/conf/httpd.conf file first.
The code is as follows
Copy Code
# VI httpd.confRemove the "#" in front of the "#Include conf/extra/httpd-mpm.conf" and save it.
S
Apache Create virtual Directory
Open the Apache configuration file httpd.conf.
At the bottom, copy the following code in, save and restart the Apache server.
The code is as follows
Copy Code
Namevirtualhost *:80#第一个主机, Port 80ServerAdmin admin@phpnow.org#指向本地位置DocumentRoot "F:wwwrootdede"#主机名称 (Note that this is important, is your do
Sometimes, we want to protect from the security point of view, to prevent malicious attacks by hackers. We will hide the server information, for example, generally we will find such as the following information.I'm using CentOS (Fedora, rhel as well)sudoOther systems (Ubuntu, Debian)sudoWe can add two lines of information to this file.//隐藏Apache版本号信息ServerTokens Prod//第一条命令尽管不会在页面上直接显示。但在response的头部还会包括。所以加上此条。And then restart the network$ sudo servic
Using Apache ant in Eclipse is simple, because eclipse itself integrates Apache Ant. Here is a Hello world.1. Create a project test, as follows:2. Create a Build.xml file below the project root, and eclipse will automatically identify and mark it as the Apache ant build file, as follows:3. Open Build.xml, when there is no content in the file, you need to write th
11.18 Apache user authenticationChange the contents of a virtual hostVim/usr/local/apache2.4/conf/extra/httpd-vhosts.confAdd user name and password? /usr/local/apache2.4/bin/htpasswd-c-m/data/.htpasswd aming-C is the creation of-m specified typeView the generated password document contentsHe's gone up there already. htpasswd directory, then create in memory does not require-CSpecify the domain name hosts on WIC:\Windows\System32\drivers\etcAuthenticat
One, Apache user authenticationVim/usr/local/apache2.4/conf/extra/httpd-vhosts.confEdit the 111.com virtual host to the following:DocumentRoot "/data/wwwroot/www.111.com"ServerName www.111.comAllowOverride authconfig//This equivalent to open the authentication switchAuthName "111.com user auth"//Custom certified name, not very usefulAuthType Basic//authentication type, generally basicAUTHUSERFILE/DATA/.HTPASSWD//Specify the location of the password fi
One, Apache user authenticationThe function is that when users visit a website, they need to enter a user name and password to enter the site. Some important sites or websites are often authenticated by users to ensure security.# vim/usr/local/apache2.4/conf/extra/httpd-vhosts.confDocumentRoot "/data/wwwroot/111.com"ServerName 111.comServeralias www.example.comAllowOverride authconfig//Turn on the certified switchAuthName "111.com user auth"//Custom c
Simulate the speed of the HTTP network when debugging the network using the Apache plug-in bandwidth mod
1. Install mod_bw
Download http://bwmod.sourceforge.net /#
Extract
Enter the directory for execution
Sudo apxs2-I-a-c mod_b1_c
2. Configuration
Add the following to the configuration file/etc/apache2/httpd. conf:
1 kb/s in low speed mode
Set to high-speed mode kb/s
3. The configuration takes effect.
Sudo/etc/init. d/apache2 restart
Reload doe
[Author] Nick Kew [press] Prentice Hall[File format] PDF [ISBN] 0-13-240967-4
Chapter 1 applications development with ApacheChapter 2 The Apache platform and architectureChapter 3 the Apache Portable RuntimeChapter 4 Programming Techniques and caveatsChapter 5 writing a content GeneratorChapter 6 request processing cycle and metadata handlersChapter 7 AAA: Access, authentication, and authorizationChapter 8
Three configuration methods are available for apache Virtual Hosts and three for apache Virtual Hosts.
Go straight to the topic !!!
To use a VM, you must comment out the httpd Host module, that is, modify the main configuration file of httd. conf, find
Apche has three types of virtual host configurations: IP address, port-based, and domain name-based. For subsequent experiments, we need to configure two IP
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.