Windows 2003 IIS 6.0 to build a ASP+.NET+PHP+JSP+MYSQL+MSSQL_ server for a virtual machine

Source: Internet
Author: User
Tags install php
1, pre-installed Windows 2003 dozen good SP2 above patch installed IIS6.0 and select ASP and. NET Support. IIS default support asp.net 1.1 asp.net 2.0 can be downloaded online
Installation.
2, install PHP, MySQL and MSSQL. Many correct introductions on the web. I'm not going to talk about it here. Focus on JSP environment collocation.
3.1. Install Java 2 SDK

I put it in the D:\JDK catalogue.
The next step is to set the environment variable, which is important, and don't forget:
Java_home = D:\JDK
CLASSPATH = D:\jdk\lib\tools.jar;d:\jdk\lib\dt.jar
Path Append D:\jdk;d:\jdk\bin
3.2, the installation of Jsp/servlets operating platform [I was RESIN3.1.1, not resin PRO3.1.1 OH]
Extract to D:\resin directory
Sets the environment variable for the resin.
Resin_home = D:\resin
Run D:\resin\bin\httpd.exe-install to install resin to the system service.
Copy my streamlined resin.conf content into D:\resin\conf\resin.conf.

<resin xmlns= "Http://caucho.com/ns/resin"
xmlns:resin= "Http://caucho.com/ns/resin/core" >
<class-loader>
<tree-loader path= "${resin.home}/lib"/>
<tree-loader path= "${server.root}/lib"/>
</class-loader>

<management path= "${server.root}/admin" >
</management>
<log name= "" Path= "stdout:" timestamp= "[%h:%m:%s.%s]"/>

<logger name= "Com.caucho" level= "info"/>
<logger name= "Com.caucho.java" level= "config"/>
<logger name= "Com.caucho.loader" level= "config"/>

<dependency-check-interval>2s</dependency-check-interval>

<system-property mail.smtp.host= "127.0.0.1"/>
<system-property mail.smtp.port= "/>"

<javac compiler= "Internal" args= "-source 1.5"/>

<cluster id= "App-tier" >
<root-directory>.</root-directory>
<server-default>
<jvm-arg>-Xmx256m</jvm-arg>
<jvm-arg>-Xss1m</jvm-arg>
<jvm-arg>-Xdebug</jvm-arg>
<jvm-arg>-Dcom.sun.management.jmxremote</jvm-arg>
<watchdog-arg>-Dcom.sun.management.jmxremote</watchdog-arg>
<memory-free-min>1M</memory-free-min>

<thread-max>256</thread-max>
<socket-timeout>65s</socket-timeout>
<keepalive-max>128</keepalive-max>
<keepalive-timeout>15s</keepalive-timeout>
</server-default>
<server id= "" address= "127.0.0.1" port= "6800"/>
<resin:import path= "${resin.home}/conf/app-default.xml"/>

<web-app-default>
<cache-mapping url-pattern= "/" expires= "5s"/>
<cache-mapping url-pattern= "*.gif" expires= "60s"/>
<cache-mapping url-pattern= "*.jpg" expires= "60s"/>
<cache-mapping url-pattern= "*.png" expires= "60s"/>
<allow-servlet-el/>
<session-config>
<enable-url-rewriting>false</enable-url-rewriting>
</session-config>
</web-app-default>
<web-app id= "/" root-directory= "D:\wwwroot\localhost"/>
<web-app id= "/resin-admin" root-directory= "${resin.home}/php/admin" >
</web-app>
</cluster>
</resin>

Third, hook up the resin into IIS
Follow the steps:
Set up D:\wwwroot\jspsite directory in D disk. This is the home directory of the JSP Web site.
Then create a test test.jsp file under the directory.
Enter the following content:
<HTML>
<HEAD>
<title>jsp Simple example</title>
</HEAD>
<BODY>
<% out.println ("Hello, world!"); %>
</BODY>
</HTML>
Next, set up the D:\wwwroot\scripts directory in D disk.
Copy the Isapi_srun.dll in the D:\resin\libexec directory to the D:\wwwroot\scripts directory.
and set directory permissions to everyone's read and run, similar to PHP directory settings ah. You can see him as one thing.
Start IIS6.0, first adding Web service extensions that allow. JSP suffixes within the Web service extensions.
Extensions are free to fill in, File selection D:\wwwroot\scripts\isapi_srun.dll
This is the WINDOWS2003 IIS6.0 Enhanced security feature that allows you to allow which service extensions are allowed on the server and which are prohibited. Set to Allow.
Open the Site folder properties, not the properties of the site Oh. See, add a new filter inside the ISAPI filter, name at random, enter JSP here,
Re-enter the executable file, D:\wwwroot\scripts\isapi_srun.dll
After confirmation, be aware that the DLL just hooked up will not take effect immediately, and the priority will also show * unknown *
It doesn't matter, don't bother. Continue to go down.
Add the. jsp extension in the home directory]-[configuration]-[Cache ISAPI extension. File selection D:\wwwroot\scripts\isapi_srun.dll.
If you don't want all sites to support JSP. This step can be omitted. In the future, you can fill in the site properties to support the JSP.
Here we need to do is more important and complex things, that is, modify the resin configuration file.
Allow Iis+resin to support virtual hosts. (A lot of people want to look seriously ~ ~ I found on the Web tutorials are rarely introduced in this part of the virtual host. Only the introduction of a single station.)
Set up a JSP site, www.servsd.cn point to my IP 219.146.55.180
Set up a JSP site, t.servsd.cn point to my IP 219.146.55.180
Next, I modify the configuration file in the c:\resin\conf directory resin.conf
It's very critical here, but the most important thing is a place.
Copy
<web-app id= "/" root-directory= "D:\wwwroot\localhost"/>
<web-app id= "/resin-admin" root-directory= "${resin.home}/php/admin" >
</web-app>
For two copies, and make the corresponding changes.
<web-app id= "/" root-directory= "d:\wwwroot\www"/> [root-directory fill in the root directory of the corresponding site]
<web-app id= "/resin-admin" root-directory= "${resin.home}/php/admin" >
</web-app>
<web-app id= "/" root-directory= "d:\wwwroot\t"/> [Ibid.]
<web-app id= "/resin-admin" root-directory= "${resin.home}/php/admin" >
</web-app>
Add a virtual directory to the Web site for each JSP, with the directory named scripts, and remove all permissions, leaving only the executable.
Reboot the resin and reboot IIS.
Check to see if resin is hooked up to IIS by looking at the ISAPI filter
If the status is a green arrow, it indicates that the system has been successfully hooked up.
Then browse www.servsd.cn and t.servsd.cn access test.jsp files.
In fact, you can also go to the next probe. The current directory is displayed in the probe. Two station directory different words the virtual host is configured successfully.
and ASP Web site can also run, PHP is not OK? You want to know why?
<resin:import path= "${resin.home}/conf/app-default.xml"/> in resin.conf
App-default.xml is called here to confirm the file type. Just erase all the PHP-related here and get rid of it.
If not yet. Delete all files in the Conf directory and PHP. Reboot IIS and resin. Ok!
Finish the work.
Related Article

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.