Over the past few days, I have played Apache HTTP Server again.
Apache has a powerful web server configuration function, or it will not become the world's largest Web Server SETUP tool. However, Apache installed by default cannot run Asp.net, which is a pity, recently I have been playing Asp.net, so I am eager to run Asp.net on Apache. I found it online and soon got the answer:
Http://weblogs.asp.net/israelio/archive/2005/09/11/424852.aspx
For more information:
Http://www.apache.org/dist/httpd/binaries/win32/
Download the latest Apache HTTP Server MSI installer package or installer package for installation.
Http://www.apache.org/dist/httpd/mod_aspdotnet/
Download mod_aspdotnet's latest MSI installer package for Installation
Edit the Apache configuration file httpd. conf and add the following content at the end:
# Asp.net
Loadmodule aspdotnet_module "modules/mod_aspdotnet.so"
addhandler Asp.net asax ascx ashx asmx aspx axd config CS csproj licx REM resources resx soap VB vbproj vsdisco webinfo
# Load ASP. net/ASP application Program
aspnetmount/sampleasp "C: /sampleasp "
alias/sampleasp" C: /sampleasp "
#/sampleasp is equivalent to a virtual directory in IIS and points to" C:/sampleasp ", which can be customized.
# Run http: // localhost/sampleasp view
# Set directory permissions
options followsymlinks execcgi
order allow, deny
allow from all
directoryindex index.htm index. aspx
# This sentence is equivalent to setting the default document in IIS
# Specify the aspnet_client directory path
Aliasmatch/aspnet_client/system_web/(\ D +) _ (\ D + )/(. *) "C:/Windows/Microsoft. net/framework/V $1. $2. $3/asp. netclientfiles/$4"
<Directory "C:/Windows/Microsoft. NET/framework/V */asp. netclientfiles">
Options followsymlinks
Order allow, deny
Allow from all
</Directory>
</Ifmodule>
# Asp.net
C:/sampleasp and its alias -- the virtual directory name can be customized, saved, restart Apache.
Add the index. aspx file to sampleasp and test it at http: // localhost/sampleasp/index. aspx.
Finished!