Questions about httpd. conf setting in apache2.4.6

Source: Internet
Author: User
Httpd. conf setting in apache2.4.6 & nbsp; recently, I was learning to use apache2.4.6. However, I am worried that I don't know how to set my own virtual directory. The method set in apache2.2 does not work in 2.4.6. please kindly advise !!!!! Httpd. conf setting in apache2.4.6
Recently, I was learning to use apache2.4.6. However, I am worried that I don't know how to set my own virtual directory. The method set in apache2.2 does not work in 2.4.6. please kindly advise !!!!!

Share:


------ Solution --------------------
This sentence is written in htto. conf.

Include conf/local-vhosts.conf

Then create a file in the same directory named local-vhosts.conf, maybe apache already has one, renamed
Write the following things in it, modify them according to your actual situation, and save and restart apache.

# Port customization
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 email
DocumentRoot "absolute path"
ServerName localadm
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common


The configuration should be generic. if the configuration fails after upgrade, Some statements may conflict with each other. view the apache logs
------ Solution --------------------
Listen 8891.

NameVirtualHost *: 8891 # the port number you want to set


ServerAdmin admin @ localhost
DocumentRoot "e:/xiangmu/xiangmu1" # The location where your source code is to be stored. do not use the Chinese path.
ServerName 192.168.111.111: 8891 # Your local ip address + 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 # Your local ip address


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.