apache2.4.6 httpd.conf Settings Related issues

Source: Internet
Author: User
httpd.conf Setup issues for apache2.4.6
Recently, learning to use apache2.4.6, but, distressed is, do not know how to set up their own virtual directory. In the apache2.2 set the method, to the 2.4.6 in no matter, please guide AH!!!!!

Share to:


------Solution--------------------
Htto.conf wrote this sentence inside.

Include conf/local-vhosts.conf

Then in the same directory to build a file, named Local-vhosts.conf, probably Apache already has a, renamed
Write the following on the inside, change according to your actual situation, and save restart Apache

#端口自定
ServerAdmin xxx@mail.com
DocumentRoot "Absolute path"
ServerName Localadm
Errorlog Logs/dummy-host.example.com-error_log
Customlog Logs/dummy-host.example.com-access_log Common


ServerAdmin Mailbox
DocumentRoot "Absolute path"
ServerName Localadm
Errorlog Logs/dummy-host.example.com-error_log
Customlog Logs/dummy-host.example.com-access_log Common


Configuration should be generic, if not after the upgrade, should be some statements conflict, view Apache logs
------Solution--------------------
Listen 8891

Namevirtualhost *:8891 #你想要设置的端口号


ServerAdmin Admin@localhost
DocumentRoot "E:/XIANGMU/XIANGMU1" #你源码想存放的位置, do not Chinese path
ServerName 192.168.111.111:8891 #你本机ip + port number

Options Indexes FollowSymLinks
AllowOverride All
Order Deny,allow
Deny from all
Allow from 127.0.0.1
Allow from 127.0.0.1
Allow from 192.168.111.111 #你本机ip


  • 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.