#1  
Old 10th October 2007, 20:29
rusvdw rusvdw is offline
Junior Member
 
Join Date: Oct 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Smile ISPConfig and Mono

Been struggling with getting asp.net working with mono in ISPConfig on my Ubuntu Edgy box for a couple of days now. Just got it working, so thought i'd best post the configs here for others in need (and probably myself again when I screw everything up).

Let me also state that I'm no expert at this, this is just what happens to have worked for me.

Firstly, make sure you've got mod_mono installed and working with apache2 before trying this. See http://timanisblog.com/2007/07/22/in...ons-in-ubuntu/ for instructions on doing so.

Next, get into your ISPConfig administrators panel, click on the site you wish to enable mono for and enter the following in the "Apache Directives
(Optional)" field:

Code:
MonoAutoApplication enabled
MonoDocumentRootDir "/var/www/web1/web/"
MonoServerPath example "/usr/bin/mod-mono-server2"
MonoApplications example "/:/var/www/web1/web/"
Alias /mono "/var/www/web1/web/"
<Directory /var/www/web1/web/>
SetHandler mono
MonoSetServerAlias example
AddHandler mod_mono .aspx .ascx .asax .ashx .config .cs .asmx
</Directory>
Of course you should make sure that you change "example" to a string that's relevant for you. Do not put the full hostname in there (e.g. example.com). Doing so was what kept me busy with this for 2 days You should also of course make sure that the "/var/www/web1/web/" part reflects the correct path for the website you're enabling mono for.

Be aware that if the stuff you entered has errors, ISPConfig won't tell you about it. You may want to check the /etc/apache2/vhosts/Vhosts_ispconfig.conf file to make sure that what you entered is indeed being saved in the hosts file.

As a final example, your Vhosts_ispconfig.conf should look something like this after completing the steps above:

Code:
###################################
#
# ISPConfig vHost Configuration File
#         Version 1.0
#
###################################
#
NameVirtualHost 123.123.123.123:80
<VirtualHost 123.123.123.123:80>
  ServerName localhost
  ServerAdmin root@localhost
  DocumentRoot /var/www/sharedip
</VirtualHost>
#
#
######################################
# Vhost: www.example.co.za:80
######################################
#
#
<VirtualHost 123.123.123.123:80>
MonoAutoApplication enabled
MonoDocumentRootDir "/var/www/web1/web/"
MonoServerPath example "/usr/bin/mod-mono-server2"
MonoApplications example "/:/var/www/web1/web/"
Alias /mono "/var/www/web1/web/"
<Directory /var/www/web1/web/>
SetHandler mono
MonoSetServerAlias example
AddHandler mod_mono .aspx .ascx .asax .ashx .config .cs .asmx
</Directory>
ServerName www.example.co.za:80
ServerAdmin webmaster@example.co.za
DocumentRoot /var/www/web1/web
ServerAlias example.co.za m.example.co.za
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm default.aspx Default.aspx
ScriptAlias  /cgi-bin/ /var/www/web1/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web1/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
<Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php3>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php4>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php5>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
php_admin_flag safe_mode Off
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/var/www/web1/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
</VirtualHost>
#
Reply With Quote
Sponsored Links
  #2  
Old 11th October 2007, 07:55
Ben Ben is offline
Moderator
 
Join Date: Jul 2006
Posts: 1,029
Thanks: 7
Thanked 62 Times in 56 Posts
Default

Quote:
Be aware that if the stuff you entered has errors, ISPConfig won't tell you about it. You may want to check the /etc/apache2/vhosts/Vhosts_ispconfig.conf file to make sure that what you entered is indeed being saved in the hosts file.
That's right, for that purpose you could check the ispconfig.log anywhere in /root/ispconfig/, ideally with tail -f to see which exact error httpd throws when trying to start with the new generated config.
Reply With Quote
  #3  
Old 8th February 2012, 01:53
davidcapo davidcapo is offline
Junior Member
 
Join Date: Feb 2012
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
 
Smile Solution

application can not run mod_mono index in the same directory where the application is running php default, this is why it causes these problems is solved instead of completing what you have written in the apache directives in ispconfig internal folder test example, then where it says:
/:/var/www/web1/web/
replace for:
/test:/var/www/web1/web/test/

complete apache directives:

MonoPath default "/usr/lib/mono/2.0"
MonoServerPath default /usr/bin/mod-mono-server2
AddMonoApplications default "/test:/var/www/web1/web/test/"
<location /test>
MonoSetServerAlias default
SetHandler mono
</location>

www.ddpyp.com.ar
Reply With Quote
The Following User Says Thank You to davidcapo For This Useful Post:
falko (8th February 2012)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mono support Zoon Feature Requests 1 8th July 2008 14:56
ISPConfig Stable + Development till Developers' Forum 7 20th May 2006 11:15
fc5 and ispconfig pontifex Installation/Configuration 4 27th March 2006 16:41
Suse 9.3 and Mono Error pontifex Installation/Configuration 1 27th November 2005 21:58
mono entry in vhost pontifex Feature Requests 3 13th August 2005 19:14


All times are GMT +2. The time now is 03:01.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.