Run Asp.net in Apache

Source: Internet
Author: User
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!

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.