Windows Apache Port configuration

Source: Internet
Author: User

Locate the configuration file httpd.conf and open it with the editor.

Before adding a port, we can see if the port has been opened and the command is as follows:

Window View Port:

# View All ports
$ netstat-n-A
# See if Port 8081 is occupied
$ NETSTAT-AON|FINDSTR "8081"

  

Mac View Port:

Lsof-i Tcp:port

To confirm that a port is not in use, set the port. We add a port to the httpd.conf configuration file and open the virtual host.

Add Port:

Listen 8081

To open a virtual host:

Instead, open the virtual host as follows.

Save and close the httpd.conf file.

Then hit the conf/extra/httpd-vhosts.conf file and configure the port information:

<virtualhost *:8081>     ServerAdmin [email protected]     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>

  

Windows Apache Port configuration

Related Article

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.