惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
博客园 - 聂微东
Application and Cybersecurity Blog
Application and Cybersecurity Blog
MyScale Blog
MyScale Blog
罗磊的独立博客
H
Help Net Security
L
LangChain Blog
T
Threat Research - Cisco Blogs
量子位
S
Securelist
Last Week in AI
Last Week in AI
L
Lohrmann on Cybersecurity
T
The Exploit Database - CXSecurity.com
P
Privacy International News Feed
The Hacker News
The Hacker News
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Blog of Author Tim Ferriss
T
Threatpost
Security Latest
Security Latest
P
Palo Alto Networks Blog
Microsoft Security Blog
Microsoft Security Blog
NISL@THU
NISL@THU
F
Full Disclosure
WordPress大学
WordPress大学
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Heimdal Security Blog
J
Java Code Geeks
Recorded Future
Recorded Future
Hugging Face - Blog
Hugging Face - Blog
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42
B
Blog RSS Feed
月光博客
月光博客
C
Cisco Blogs
V
Visual Studio Blog
D
DataBreaches.Net
H
Hacker News: Front Page
博客园 - 叶小钗
N
News and Events Feed by Topic
爱范儿
爱范儿
A
Arctic Wolf

博客园 - 凌点

clr20r3 system.InvalidOperationException 程序终止的几种解决方案 能上Q 不能上网 JavaScript中url 传递参数(特殊字符) C#中使用 SendMessage 向非顶端窗体发送组合键 System.Xml.XmlException: 根级别上的数据无效 XP,WIN7双系统启动问题 VM安装XP注意事项 VC 命令行 捕获输出 make 信息重定向 VC 进度条制件CProgressCtrl 用法笔记 VC List Control控件高级使用 List Control 控件技巧总汇 VC中字符串取子串总结 如何禁用Windows屏保和电源管理 VC获取硬盘物理序列号 unicode cstring to char* - 凌点 将unicode的 Cstring 复制到粘贴板 VC由进程ID获取窗口句柄 嵌入式Linux操作系统学习规划
apache 多站点配置
凌点 · 2012-07-10 · via 博客园 - 凌点

1: 安装好AppServ2.5.9软件,官网是:[url]http://www.appservnetwork.com/[/url]
,2.59下载地址是:[url]http://nchc.dl.sourceforge.net/sourceforge/appserv
/appserv-win32-2.5.9.exe[/url] 是英文软件,但是安装时可以选择gbk-gb2312的编码(我自己用utf-8)。
2: 修改本机的hosts文件,如下:
示例:
127.0.0.1            localhost
127.0.0.1       http://www.dede.com/
127.0.0.1       http://www.phpcms.com/

3: 打开appserv的安装目录,找到httpd.conf文件,分别去掉下面两行文字前面的#号。
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
去掉#意思是启用apache的虚拟主机功能。

#Include conf/extra/httpd-vhosts.conf
去掉这一行的#意思是从conf/extra/httpd-vhosts.conf这个文件导入虚拟主机配置。

4: 打开extra目录内的httpd-vhosts.conf文件,什么都不管,直接在文件底部加入自己要加的虚拟主机的信息。如下面所示。
分别是给出一个管理员邮箱、指出此网站的根目录、域名、和错误日志存放位置。注意目录间隔最好用/而不是/ 。

<VirtualHost *:80>
        ServerAdmin jsw7001@hotmail.com
        DocumentRoot E:/AppServ259/www/dede
        ServerName http://www.dede.com/
        ErrorLog E:/AppServ259/www/dede/error.log
        CustomLog logs/dummy-host2.appservnetwork.com-access_log common
</VirtualHost>

<VirtualHost *:80>
        ServerAdmin jsw7001@hotmail.com
        DocumentRoot E:/AppServ259/www/phpcms
        ServerName http://www.phpcms.com/
        ErrorLog E:/AppServ259/www/dede/error.log
        CustomLog logs/dummy-host2.appservnetwork.com-access_log common
</VirtualHost>    

*以上路径中的斜线左斜右斜都可以。

5: 将appserv的apache服务重启,就可以了,可以在各网站的根目录下放一个index.html文件,如果能看到,说明就对了。

     上边是使用域名的方法。

     下边说下如何使用本地IP+端口的方法。

     例如本机IP为:192.168.0.10
     那如何控制  80 、1000、1001、1002 来访问不同的文件目录,而达到多个站点同时访问的目的?

     打开appserv的安装目录,找到httpd.conf文件,找到:
     Listen 80
     加入:
Listen 80
Listen 1000
Listen 1001
Listen 1002

然后参照虚拟主机的设置方法。不同的是:
<VirtualHost *:80> 这个后边的端口号按自己需求更改就成了。

如果 弄完之后 出现403错误 那 在httpd.conf里找到:

<Directory />
   Options FollowSymLinks ExecCGI Indexes
   AllowOverride None
   Order deny,allow
   Deny from all
   Satisfy all
</Directory>

更改为
<Directory />
   Options FollowSymLinks ExecCGI Indexes
   AllowOverride None
#    Order deny,allow
#    Deny from all
#    Satisfy all
</Directory>