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