Alias /mysql "e:/phpmyadmin/" 定义虚拟目录名称mysql 地址为e:/phpmyadmin,
其实网上的资料也是这么写的,但复制过来就出错,建议大家还是自己一个字一个字的敲打。
apache开启mod_rewrite
#LoadModule rewrite_module modules/mod_rewrite.so
将前面的#去掉就可以了
另外,在apache上配置站点:
NameVirtualHost www.nenger.com
<VirtualHost www.nenger.com>
ServerAdmin webmaster@nenger.com
DocumentRoot "E:/nenger.com"
ServerName www.nenger.com
ErrorLog logs/www.nenger.com-error_log
CustomLog logs/www.nenger.com-access_log common
</VirtualHost>
NameVirtualHost www.nenger.com
<VirtualHost www.nenger.com>
ServerAdmin webmaster@nenger.com
DocumentRoot "E:/nenger.com"
ServerName www.nenger.com
ErrorLog logs/www.nenger.com-error_log
CustomLog logs/www.nenger.com-access_log common
</VirtualHost>
如何实现用端口来测试不同的网站?
首先要添加你要用到的端口
Listen 80
Listen 81
Listen 81
然后添加站点:
NameVirtualHost localhost:81
<VirtualHost localhost:81>
ServerAdmin webmaster@nenger.com
DocumentRoot F:/nenger.com/web
ServerName locahost:81
</VirtualHost>
<VirtualHost localhost:81>
ServerAdmin webmaster@nenger.com
DocumentRoot F:/nenger.com/web
ServerName locahost:81
</VirtualHost>
这样你就可以用81端口来打开你的另一个网站