Apach: Modify the port number, root directory, and add multiple domain names

Source: Internet
Author: User
Modify the Apache port number

Select httpd. conf under Apache
Find listen 80 and servername localhost: 80
Modify 80
Close and then open

Modify the Wamp to open the localhost and phpMyAdmin ports on the hosts page.

Open the wampmanager. TPL file in the Wamp installation directory.
Find
Parameters: "http: // localhost/"; glyph: 5
Parameters: "http: // localhost/PHPmyAdmin/"; glyph: 5
Add Port
Close and then open

Modify the default phpMyAdmin Password(No Password need not be modified)

Go to the phpMyAdmin folder under wampapps under the installation drive letter
Open the config. inc file
Find
$ Cfg ['servers'] [$ I] ['user'] = 'root'
$ Cfg ['servers'] [$ I] ['Password'] = 'enter your password'
Enter Password

References: http://www.jb51.net/softjc/73966.html


Modify the root directory of an Apache website,
1. Modify the DocumentRoot:
DocumentRoot "F:/web/www"
2. Search (this shocould be changed to whatever you set DocumentRoot to) and find
Change directory:
<Directory "F:/web/www">

Restart Apache. Create multiple websites 
Open HTTP. conf
1. Change servername 127.0.0.1 to servername. Your Server IP Address
2, # modify namevirtualhost * to "namevirtualhost your server IP Address"
3. There is a VM format at the end of the file,
# <Virtualhost *>
# Serveradmin [email] [email protected] [/Email]
# DocumentRoot/www/httpd/html/minidx.com
# Servername minidx.com
# Errorlog logs/minidx.com-error_log
# Customlog logs/minidx.com-access_log common
# </Virtualhost>
Add:
<Virtualhost your server IP address>
DocumentRoot usr/local/www/(default website path)
Servername: Your Server IP Address
</Virtualhost>
<Virtualhost your server IP address>
DocumentRoot usr/local/www/minidx.com/(website path)
Servername minidx.com (your domain name)
</Virtualhost>
<Virtualhost your server IP address>
DocumentRoot usr/local/www/NTT. CC/(website path)
Servername NTT. CC (your second domain name)
</Virtualhost>

Http://blog.csdn.net/wxh0417/article/details/6152649
Http://jingyan.baidu.com/article/363872ecec3e496e4ba16fdc.html
Http://blog.sina.com.cn/s/blog_6f6b4c3c0100nei5.html

Apach: Modify the port number, root directory, and add multiple domain names

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.