Difference between revisions of "ASP.NET with Apache"

From ArchWiki
Jump to: navigation, search
(Changed "/etc/rc.d/httpd restart" to "systemctl restart httpd.service".)
(Configuring)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Web Server]]
+
[[Category:Web server]]
 
{{merge|Apache}}
 
{{merge|Apache}}
{{Article summary start| Summary }}
+
Describes how to show ASP.NET-sites under [[Apache]] by using Mod_Mono.
{{Article summary text|Describes how to show ASP.NET-sites under [[Apache]] by using [http://www.mono-project.com/Mod_mono Mod_Mono]}}
+
 
{{Article summary end}}
+
 
From [http://www.mono-project.com/Mod_mono Mod_Mono's site]:
 
From [http://www.mono-project.com/Mod_mono Mod_Mono's site]:
 
:"''Mod_Mono is an Apache 2.0/2.2 module that provides ASP.NET support for the web's favorite server, Apache (http://httpd.apache.org/).''"
 
:"''Mod_Mono is an Apache 2.0/2.2 module that provides ASP.NET support for the web's favorite server, Apache (http://httpd.apache.org/).''"
  
 
==Installing==
 
==Installing==
The setup requires {{Pkg|mono}} and {{Pkg|mono_mod}} for Apache compliance. Package {{Pkg|xsp}} is a simple webserver for ASP.NET, optionally installed for testing the configuration.
+
The setup requires {{Pkg|mono}} and {{Pkg|mod_mono}} for Apache compliance. Package {{Pkg|xsp}} is a simple webserver for ASP.NET, optionally installed for testing the configuration.
  pacman -S mono mod_mono xsp
+
  
 
==Configuring==
 
==Configuring==
 
Edit {{ic|/etc/httpd/conf/httpd.conf}} and add the following line:
 
Edit {{ic|/etc/httpd/conf/httpd.conf}} and add the following line:
   Include /etc/httpd/conf/mod_mono.conf
+
   Include /etc/httpd/conf/extra/mod_mono.conf
  
 
Finally, restart apache with:
 
Finally, restart apache with:
Line 25: Line 23:
 
With this setting, configuring apache for each deployment is no longer needed; just place the application in any directory within html-root and it will be promptly auto-configured. Add the following lines to {{ic|/etc/httpd/conf/httpd.conf}} to enable the option:
 
With this setting, configuring apache for each deployment is no longer needed; just place the application in any directory within html-root and it will be promptly auto-configured. Add the following lines to {{ic|/etc/httpd/conf/httpd.conf}} to enable the option:
 
   # Choose ASP2.0 support instead of the default 1.0
 
   # Choose ASP2.0 support instead of the default 1.0
   MonoServerPath "/usr/bin/mod-mono-server2"
+
   MonoServerPath "/usr/bin/mod-mono-server4" # mono 4
 
   MonoAutoApplication enabled
 
   MonoAutoApplication enabled
  
 
==Testing==
 
==Testing==
 
If xsp is installed and html-path is {{ic|/httpd/html}}, then open a browser and access http://server/xsp/ to see an overview over the ASP.NET-testfiles.
 
If xsp is installed and html-path is {{ic|/httpd/html}}, then open a browser and access http://server/xsp/ to see an overview over the ASP.NET-testfiles.

Latest revision as of 12:46, 6 September 2015

Merge-arrows-2.pngThis article or section is a candidate for merging with Apache.Merge-arrows-2.png

Notes: please use the second argument of the template to provide more detailed indications. (Discuss in Talk:ASP.NET with Apache#)

Describes how to show ASP.NET-sites under Apache by using Mod_Mono.

From Mod_Mono's site:

"Mod_Mono is an Apache 2.0/2.2 module that provides ASP.NET support for the web's favorite server, Apache (http://httpd.apache.org/)."

Installing

The setup requires mono and mod_mono for Apache compliance. Package xsp is a simple webserver for ASP.NET, optionally installed for testing the configuration.

Configuring

Edit /etc/httpd/conf/httpd.conf and add the following line:

 Include /etc/httpd/conf/extra/mod_mono.conf

Finally, restart apache with:

 systemctl restart httpd.service

Now, Apache should be able to show ASP.NET-pages.

AutoHosting

Further details: http://www.mono-project.com/AutoHosting

With this setting, configuring apache for each deployment is no longer needed; just place the application in any directory within html-root and it will be promptly auto-configured. Add the following lines to /etc/httpd/conf/httpd.conf to enable the option:

 # Choose ASP2.0 support instead of the default 1.0
 MonoServerPath "/usr/bin/mod-mono-server4" # mono 4
 MonoAutoApplication enabled

Testing

If xsp is installed and html-path is /httpd/html, then open a browser and access http://server/xsp/ to see an overview over the ASP.NET-testfiles.