Table of Contents
How to configure virtual machines in Apache server, apache virtual machine
Home Backend Development PHP Tutorial How to configure a virtual machine in Apache server, apache virtual machine_PHP tutorial

How to configure a virtual machine in Apache server, apache virtual machine_PHP tutorial

Jul 12, 2016 am 08:54 AM
telnet

How to configure virtual machines in Apache server, apache virtual machine

Sina Weibo virtual machine development and configuration steps and introduction.
1. Since Rewrite will be used in the virtual machine later, edit the httpd.conf file in the conf directory of Apache first. (Can be operated according to actual needs)
Add mod_rewrite.so module support. Remove the # sign in front of the following lines.
LoadModule rewrite_module modules/mod_rewrite.so
2. Configure apache to support virtual machines. This step is very important.
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
Find the relevant text above and remove the # before #Include conf/extra/httpd-vhosts.conf.
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
Save and exit.
3. Edit httpd-vhosts.conf in the extra folder in the conf directory.
Remove the instance configuration and add new configuration. Taking Sina Weibo as an example, the configuration file is as follows:
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
#
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias ​​in any block.
#

#Administrator Email
ServerAdmin jiangfeng3@staff.sina.com.cn
#Project root directory
DocumentRoot "D:/htdocs/frame_export"
#Domain name
ServerName test.t.sina.com.cn
#Alias ​​lias test.t.sina.com .cn
#Error log path
ErrorLog "logs/test.t.sins.com.cn-error.log"
CustomLog "logs/test.t.sins.com.cn-access.log " common
RewriteEngine on
#Rewrite rules, you can add them according to actual needs
RewriteRule ^/(.*)$ /apps/index.php [L]

4. Edit the local host file, taking windows as an example
Enter C:/Windows/System32/drivers/etc
Open the hosts file with notepad
Finally add
127.0.0.1 localhost
127.0 .0.1 test.t.sina.com.cn
Example:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 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 localhost
127.0. 0.1 test.t.sina.com.cn
Save and exit
5. Restart apache and enter http://test.t.sina.com.cn
in the browser

Please indicate the original address for reprinting: http://www.server110.com/apache/201309/1615.html

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1119057.htmlTechArticleHow to configure virtual machines in Apache server, apache virtual machine Sina Weibo virtual machine development and configuration steps and introduction. 1. Since Rewrite will be used in the virtual machine later, edit Apach first...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Telnet in Windows 11 Complete Tutorial [Installation/Enablement and Troubleshooting] Telnet in Windows 11 Complete Tutorial [Installation/Enablement and Troubleshooting] May 22, 2023 pm 09:35 PM

<p>Telnet is the abbreviation of "Terminal Network". It is a protocol that users can use to connect one computer to a local computer. </p><p>Here, the local computer refers to the device that initiates the connection, and the computer connected to the local computer is called the remote computer. </p><p>Telnet runs on a client/server principal, and although it is outdated, it is still used by many people in 2022. Many people have already switched to Windows 11 operating system, which is the latest operating system offered by Microsoft. &

Teach you how to enable telnet service in win11 Teach you how to enable telnet service in win11 Dec 27, 2023 am 10:23 AM

When we perform remote connection operations, we may need to enable the telnet service before we can continue. However, after updating the system, many people cannot find how to enable the win11 telnet service. In fact, just add the program service. How to open the win11telnet service: 1. First, we open the "Start Menu" at the bottom, as shown in the figure. 2. Then open the "Settings" 3. Then enter the "Application" settings on the left. 4. Then open "Optional Features" in the upper right corner. 5. After opening, scroll down to the bottom and open "More Windows Features". 6. Then find "Telnet Client", check it and click "OK". 7. Finally wait. After the system has completed the changes, you can start the telnet service.

How to use telnet command How to use telnet command Nov 06, 2023 pm 02:58 PM

Telnet command usage: 1. Open the command line interface; 2. Enter the telnet command, followed by the IP address or domain name of the target host to be connected; 3. Press the Enter key, and telnet will try to establish a connection with the target host; 4. If the connection is successful, you will see a welcome message or login prompt; 5. Enter the user name and password to log in to the target host; 6. After successful login, you can perform various commands and operations just like operating on the local computer; 7. After completing the operation, you can use specific commands to exit the telnet session.

Win10 telnet command is invalid Win10 telnet command is invalid Jan 09, 2024 am 08:25 AM

Users who have been using the win10 system for a long time have encountered that the system will inexplicably pop up a prompt that telnet is not an internal or external command during normal use. Many users are troubled by this unknown thing. To solve the problem, telnet is not an internal command. Or the problem of external commands is actually very simple. Today, the editor has brought you a detailed explanation with pictures and texts, let’s take a look. Graphical tutorial on how to solve the problem that telnet is not an internal or external command in win10 system: Operation steps: 1. In the program interface, select "Turn Windows features on or off", as shown in the figure below: 2. In the opened dialog box, find " Telnet Client" and check it. Finally click "OK" and wait a few minutes, the system will

cmdtelnet command is not recognized as an internal or external command cmdtelnet command is not recognized as an internal or external command Jan 03, 2024 am 08:05 AM

The cmd window prompts that telnet is not an internal or external command. This problem must have deeply troubled you. This problem does not appear because there is anything wrong with the user's operation. Users do not need to worry too much. All it takes is a few small steps. Operation settings can solve the problem of cmd window prompting telnet is not an internal or external command. Let’s take a look at the solution to the cmd window prompting telnet is not an internal or external command brought by the editor today. The cmd window prompts that telnet is not an internal or external command. Solution: 1. Open the computer's control panel. 2. Find programs and functions. 3. Find Turn Windows features on or off on the left. 4. Find “telnet client

telnet command in Windows cannot be found telnet command in Windows cannot be found Dec 28, 2023 am 10:41 AM

Because under normal circumstances, the telnet service of win10 system is turned off by default. This requires users to set up and manually turn it on. If telnet is not turned on, sometimes it will appear that telnet is not an internal or external command. Today, the editor will bring you the solution to the problem that telnet is not an internal or external command in Windows system! Let’s take a look. Windows system telnet is not an internal or external command. Solution: Operation steps: 1. Click the Start menu, search for "Control Panel" directly, and click the "Control Panel" application in the search results. 2. Then, the “Control Panel” window pops up in the interface. Click in the window

How to solve the telnet exit problem under CentOS How to solve the telnet exit problem under CentOS Dec 31, 2023 am 08:13 AM

Recently, some CentOS users reported that after using telnet to connect, they found that it was a problem with Windows Firewall. However, after successfully connecting using the telnet command, they found that they could not log out. What should they do? The following editor will introduce to you the solution to the failure of telnet to log out under CentOS. . Let’s go and see it together! How to exit from Linux telnet 1.ctrl+]quit Telnet is often used to test whether the port is open normally. But there is a problem that everyone may encounter. After telnet enters a certain port, it cannot exit. There is no way. In order to continue testing, I have to close the DOS (or other) window and reopen another one. Here is a method, hold down ctrl+]

MySQL and Julia: How to implement missing data processing functions MySQL and Julia: How to implement missing data processing functions Jul 31, 2023 pm 01:49 PM

MySQL and Julia: How to implement missing data processing function Missing values ​​are one of the common problems in data analysis. In actual data sets, some missing data are often encountered, which may be due to errors in the data collection process or other reasons. How to correctly handle missing data values ​​is very important to ensure the accuracy and reliability of data analysis. This article will introduce how to use MySQL and Julia to handle missing data functions, and attach corresponding code examples. 1. Use MySQL for data

See all articles