Home  >  Article  >  Backend Development  >  apache Modify port number Modify root directory Create multiple websites, apache port number_PHP tutorial

apache Modify port number Modify root directory Create multiple websites, apache port number_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:19:431000browse

apache Modify port number Modify root directory Create multiple websites, apache port number

<strong><span>修改apache端口号<br /></span></strong><br /><span>选择Apache下的httpd.conf,查找:Listen,你会看到</span><br /><br /><span>#Listen 12.34.56.78:80</span><br /><span>Listen 80</span><br /><span>把80改成90,保存就好了</span>

Modify the default port of WampServer

http://blog.csdn.net/zaocha321/article/details/7627110

Modify the apache website root directory

http://xmeix.blog.163.com/blog/static/321028522012102955141433/ Never leave the same source, find the apache directory, modify the httpd.conf file under conf,
1·Modify the DocumentRoot:
DocumentRoot "F:/web/www"
2·Search (This should be changed to whatever you set DocumentRoot to), find the
Directory 2 lines below it and change it to:
6e46e17d060ffa2cd79e856f46c99bb3

Restart apache can ​ Build multiple websites
打开http.conf <br />1,ServerName 127.0.0.1 修改成ServerName 你服务器ip <br />2,#NameVirtualHost *   修改成"NameVirtualHost 你服务器ip" <br />3,在文件最后面有虚拟主机格式, <br />#<VirtualHost *> <br />#   ServerAdmin [email]admin@minidx.com[/email] <br />#   DocumentRoot /www/httpd/html/minidx.com <br />#   ServerName minidx.com <br />#   ErrorLog logs/minidx.com-error_log <br />#   CustomLog logs/minidx.com-access_log common <br />#</VirtualHost> <br />添加: <br /><VirtualHost 你服务器ip> <br />  DocumentRoot usr/local/www/   (默认网站路径)<br />  ServerName   你服务器ip <br /></VirtualHost> <br /><VirtualHost 你服务器ip> <br />  DocumentRoot usr/local/www/minidx.com/   (网站路径)<br />  ServerName   minidx.com   (你的域名)<br /></VirtualHost> <br /><VirtualHost 你服务器ip> <br />  DocumentRoot   usr/local/www/ntt.cc/ (网站路径)<br />  ServerName   ntt.cc  (你的第二个域名)<br /></VirtualHost><br /><br />http://blog.csdn.net/wxh0417/article/details/6152649<br />http://jingyan.baidu.com/article/363872ecec3e496e4ba16fdc.html<br />http://blog.sina.com.cn/s/blog_6f6b4c3c0100nei5.html

How to change the default web port of apache

1. Find the httpd.conf file in the conf directory under the Apache installation directory (i.e. d:\Apache\conf\httpd.conf). Open it.
2. Find "Listen80", the number immediately following Listen is the port number, we change it to "Listen 8080". You can also change it to another unused port number.
3. Restart Apache to make the new configuration take effect. You can start apache using "Apache Serive Monitor" in the status bar in the lower right corner.
You can also click "Start" > "Run" > enter cmd > Enter > Navigate to the apache installation directory to the bin directory, and then enter
"httpd –k start".

How to change the apache website root directory

Open the file with a text editing tool. Find the following line in DocumentRoot: DocumentRootC:/Program Files/Apache Group/Apache2/htdocs. This is the root directory of your website. You can modify it or use the default one. If you modify it, you must also modify the following item, otherwise 403 may appear. Error search?????? This should be changed to whatever you set DocumentRoot to the two lines below it have

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/873177.htmlTechArticleapache Modify the port number and modify the root directory to create multiple websites. Modify the apache port number and select httpd under Apache. .conf, look for: Listen, you will see #Listen 12.34.56.78:...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn