码迷,mamicode.com
首页 > 其他好文 > 详细

xampp+iis全能服务器配置说明

时间:2015-06-28 14:01:48      阅读:221      评论:0      收藏:0      [点我收藏+]

标签:

apache配置

httpd.conf

#监听端口设置
Listen 80
Listen 12.34.56.78:88
#打开http代理模块
LoadModule proxy_http_module modules/mod_proxy_http.so
#主机邮箱设置
ServerAdmin postmaster@localhost
#监听服务设置
ServerName localhost
#监听别名设置
ServerAlias localhost-alias
#打开代理转发
ProxyPreserveHost On
#jsp项目转发8080端口
ProxyPass /jsp/ http://localhost:8080/jsp/
ProxyPassReverse /jsp/ http://localhost:8080/jsp/
#asp项目转发8888端口
ProxyPass /asp/ http://localhost:8888/asp/
ProxyPassReverse /asp/ http://localhost:8888/asp/
#路径权限设置(全部拒绝)
<Directory />
    AllowOverride none
    Require all denied
</Directory>
#项目目录设置
DocumentRoot "D:/www/php"
#项目目录权限(全部允许)
<Directory "D:/www/php">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Require all granted
</Directory>
#索引文件设置
<IfModule dir_module>
    DirectoryIndex index.php index.pl index.cgi index.asp index.shtml index.html index.htm                    default.php default.pl default.cgi default.asp default.shtml default.html default.htm                    home.php home.pl home.cgi home.asp home.shtml home.html home.htm
</IfModule>
#禁用权限文件访问
<Files ".ht*">
    Require all denied
</Files>
#虚拟目录设置
<IfModule alias_module>
	#虚拟目录设置(CGI方式)
    ScriptAlias /cgi-bin/ "D:/www/cgi-bin/"
	#虚拟目录设置(普通方式)
	Alias /bin/ "D:/www/bin/"
</IfModule>
#虚拟主机设置
NameVirtualHost *:80
<VirtualHost *:80>
    ServerAdmin webmaster@example.com
    DocumentRoot "D:/www/example"
    ServerName example.com
    ServerAlias www.example.com
    ErrorLog "logs/example.com-error.log"
    CustomLog "logs/example.com-access.log" common
	ProxyPreserveHost On
	#jsp项目转发8080端口
	ProxyPass /jsp/ http://localhost:8080/jsp/
    ProxyPassReverse /jsp/ http://localhost:8080/jsp/
	#asp项目转发8888端口
	ProxyPass /asp/ http://localhost:8888/asp/
    ProxyPassReverse /asp/ http://localhost:8888/asp/
</VirtualHost>
#项目目录权限(全部允许)
<Directory "D:/www/example">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Require all granted
</Directory>

xampp.conf

#以下代码为xampp权限控制,一下项目只能在本机访问
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
        Require local
	ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

php配置

无,直接将项目放入指定路径即可

jsp配置

server.xml

<?xml version=‘1.0‘ encoding=‘utf-8‘?>
<Server port="8005" shutdown="SHUTDOWN">
    <Service name="Catalina">
        <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
        <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
        <Engine name="Catalina" defaultHost="localhost">
            <Host name="localhost"  appBase="webapps" unpackWARs="true" autoDeploy="true">
                <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
                       prefix="localhost_access_log." suffix=".txt" pattern="%h %l %u %t "%r" %s %b" />
            </Host>
        </Engine>
    </Service>
</Server>

同时部署多个tomcat监听多个端口:

1.使用压缩版的tomcat不能使用安装版的。  
2.第一个tomcat的配置不变。  
3.增加环境变量CATALINA_HOME2,值为新的tomcat的地址;增加环境变量CATALINA_BASE2,值为新的tomcat的地址。  
4.修改新的tomcat中的startup.bat,把其中的CATALINA_HOME改为CATALINA_HOME2。  
5.修改新的tomcat中的catalina.bat,把其中的CATALINA_HOME改为CATALINA_HOME2,CATALINA_BASE改为CATALINA_BASE2。  
6.修改conf/server.xml文件:  
6.1 <Server port="8005" shutdown="SHUTDOWN">把端口改为没有是使用的端口。  
6.2 <Connector port="8080" maxHttpHeaderSize="8192"  
  maxThreads="150" minSpareThreads="25" maxSpareThreads="75"  
  enableLookups="false" redirectPort="8443" acceptCount="100"  
  connectionTimeout="20000" disableUploadTimeout="true" /> 把端口改为没有是使用的端口。  
6.3<Connector port="8009"  
  enableLookups="false" redirectPort="8443" protocol="AJP/1.3" /> 把端口改为没有是使用的端口。  

asp配置

配置iis服务器监听8888端口,并将路径设置为d:\www\asp即可,具体步骤可参考网络

xampp+iis全能服务器配置说明

标签:

原文地址:http://www.cnblogs.com/leehope/p/4605374.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!