PHP + Apache how to monitor multiple ports and configure multiple sites, phpapache

Source: Internet
Author: User

PHP + Apache how to monitor multiple ports and configure multiple sites, phpapache

Configure httpd. conf

Listen to multiple ports
# Listen: Allows you to bind Apache to specific IP addresses and/or
# Ports, instead of the default. See also the <VirtualHost>
# Directive. # Change this to Listen on specific IP addresses as shown below
# Prevent Apache from glomming onto all bound IP addresses. # Listen 12.34.56.78: 80
Listen 8081.
Listen 8082.
After setting Listen 8083 and other content, you can use netstat-n-a to check whether the port is enabled.
Enable Virtual Site

# Virtual hosts
# Include conf/extra/httpd-vhosts.conf # Virtual hosts
Include conf/extra/httpd-vhosts.conf
Configure the PHP Module
When the php module is loaded, php5apache2_2 indicates that apache2.2 or a later version is used.
LoadModule php5_module "c:/php/php5apache2_2.dll"
PHPIniDir "C:/php"
Configure PHP file type ing
AddType application/x-httpd-php. php
Configure conf/extra/httpd-vhosts.conf
<VirtualHost *: 8082>
ServerAdmin
DocumentRoot "C:/PhpDocRoot/Site1 ″
ServerName localhost
ServerAlias localhost
ErrorLog "logs/dummy-host.localhost-error.log"
CustomLog "logs/dummy-host.localhost-access.log" common
<Directory "C:/PhpDocRoot/Site1">
Options Indexes FollowSymLinks
AllowOverride None
Order allow, deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *: 8083>
ServerAdmin
DocumentRoot "C:/PhpDocRoot/Site2 ″
ServerName localhost
ErrorLog "logs/dummy-host2.localhost-error.log"
CustomLog "logs/dummy-host2.localhost-access.log" common
<Directory "C:/PhpDocRoot/Site2">
Options Indexes FollowSymLinks
AllowOverride None
Order allow, deny
Allow from all
</Directory>
</VirtualHost>

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.