![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
First Cup of Ubuntu
![]() Join Date: Jun 2006
Location: MN, USA
Beans: 9
Ubuntu 6.06
|
OK, so getting ASP.NET to run on apache is not as easy as it may seem. It took me 4-5 hours over 10+ sites and a lot of retries before I got it going. So I figured I'd put it all together so hopefully it would help someone else.
* I don't give any kind of warranty for this howto. But if you follow this correctly you shouldn't have any problem. *This howto does not use the mono packages in apt but rather the current stable sources. First things First Open your terminal make sure you enable root sudo -s and get up to date apt-get update && apt-get dist-upgrade Apache Apache we do want from apt so apt-get install apache2 apache2-mpm-prefork apache2-threaded-dev apt will of course want to install the required debs as well. Even if you already have apache installed make sure to get apache2-mpm-prefork & apache2-threaded-dev Once it's done you can test it http://localhost Mono Before we download and build mono, we need to have the appropriate tools apt-get install libglib2.0-0 libglib2.0-dev pkg-config bison make Download the mono, xsp and mod_mono sources from go-mono *Note that the build number's of the source packages will change eventually. cd /tmp wget http://go-mono.com/sources/mono/mono-1.1.13.8.tar.gz wget http://go-mono.com/sources/xsp/xsp-1.1.13.7.tar.gz wget http://go-mono.com/sources/mod_mono/....1.13.5.tar.gz Unpack mono-1.1.13.8.tar.gz tar xzf mono-1.1.13.8.tar.gz Build mono cd mono-1.1.13.8 ./configure --prefix=/usr make make install XSP We'll do the same for xsp. xsp and mod_mono won't take nearly as long as mono does to make. cd /tmp tar xzf xsp-1.1.13.7.tar.gz cd xsp-1.1.13.7 ./configure --prefix=/usr make make install mod_mono and finally cd /tmp tar xzf mod_mono-1.1.13.5.tar.gz cd mod_mono-1.1.13.5 ./configure --prefix=/usr make make install Immense happiness, we are installed and ready to go! Well, not quite yet. We still need to configure apache to use mod_mono. See, the way it works, as far as I can tell, is apache takes the web request, sees it's a .aspx file that's being requested and passes it to xsp. xsp then compiles it using mono and gives the html output back to apache to serve. It's mod_mono that makes this conversation possible. Configure Apache cd /etc/apache2 vi httpd.conf OR nano httpd.conf if that's your editor of choice Append to the file Include mod_mono.conf Now edit mod_mono.conf vi mod_mono.conf At the end of the file append Alias /test "/usr/lib/xsp/test" AddMonoApplications default "/test:/usr/lib/xsp/test" <Location /test> SetHandler mono </Location> Save and exit. Then restart apache /etc/init.d/apache2 force-reload Now we test it It works! Last edited by scottwill; September 21st, 2006 at 07:12 PM.. |
|
|
|
|
|
#2 |
|
5 Cups of Ubuntu
![]() Join Date: Apr 2006
Beans: 21
|
Re: HOWTO: apache2 w/ mono, xsp & mod_mono **NEW**
hi scottwill,
thanks for the howto, I'd been trying to get this to work for a while using various tutorials, followed yours to the letter and it works fine, i uninstalled all the synaptic versions of the software and used wget as you stated and it worked a treat. Many Thanks! Now I just need to come up with a revolutionary, world enhancing app that will improve the lives of millions! as you can see, you helped me get the hard part out of the way. |
|
|
|
|
|
#3 | |
|
5 Cups of Ubuntu
![]() Join Date: Mar 2005
Beans: 37
|
Re: HOWTO: apache2 w/ mono, xsp & mod_mono **NEW**
Hello scottwill,
Thanks! Your method worked for me as well. Now can I create an app with Visual Web Developer 2005 Express Edition and deploy it to this Apache server? http://msdn.microsoft.com/vstudio/ex.../vwd/10vcs.wvx I had trouble with the VWD "Copy Web Site", so I just used FileZilla to ftp the entire site directory "Lesson10cs" under the existing test directory as "/usr/lib/xsp/test/Lesson10cs". If I try http://localhost/test/Lesson10cs/Default.aspx I get Quote:
Alias /test2 "/usr/lib/xsp/test/Lesson10cs" AddMonoApplications default "/test2:/usr/lib/xsp/test/Lesson10cs" <Location /test2> SetHandler mono </Location> and try http://localhost/test2 I get 500 Internal Server Error |
|
|
|
|
|
|
#4 |
|
First Cup of Ubuntu
![]() Join Date: Jun 2006
Location: MN, USA
Beans: 9
Ubuntu 6.06
|
Re: HOWTO: apache2 w/ mono, xsp & mod_mono **NEW**
Sorry but the answer is no. Visual Web Developer 2005 Express Edition uses the 2.0 .Net framework, whereas this howto only covers the 1.1 .Net framework. (Someone let me know if I am mistaken.)
There is a solution for Mono to use 2.0 over 1.1, but I have yet to try it myself. |
|
|
|
|
|
#5 |
|
5 Cups of Ubuntu
![]() Join Date: Mar 2005
Beans: 37
|
Re: HOWTO: apache2 w/ mono, xsp & mod_mono **NEW**
Thanks for your reply.
So, had I been developing with 1.1, my deployment steps would have been correct? Please post here if you find out how to enable 2.0 support. Which 1.1 development tool would you recommend? EDIT: Hey, let me put you onto this: http://lists.ximian.com/pipermail/mo...er/015880.html And maybe you can distill it down for us Last edited by DA_uf; September 12th, 2006 at 04:28 PM.. Reason: Found new post |
|
|
|
|
|
#6 |
|
First Cup of Ubuntu
![]() |
Re: HOWTO: apache2 w/ mono, xsp & mod_mono **NEW**
Hi, I'm a newbie trying to get apache up and running, fraid that i'm lost on this simple how to. so please bare with me. i'm able to get the downloads and unpack them. but i have a problem when i comes to the build. there must be a step between these two lines that need to be written that either you did w/o writing or did earlier. i can't get the cd comand to work, i get "bash: cd: mono-1.1.13.8.tar.gz: Not a directory" as an error. please help! thanks
bookworm ps. will this need to be done for each of these installs? tar xzf mono-1.1.13.8.tar.gz ===> something happen here? or not<==== Build mono cd mono-1.1.13.8.tar.gz ./configure --prefix=/usr make make install |
|
|
|
|
|
#7 | |
|
First Cup of Ubuntu
![]() Join Date: Jun 2006
Location: MN, USA
Beans: 9
Ubuntu 6.06
|
Re: HOWTO: apache2 w/ mono, xsp & mod_mono **NEW**
Quote:
In other words, tar will take the file 'xzf mono-1.1.13.8.tar.gz' and make a subfolder called 'xzf mono-1.1.13.8' in the current directory you are in. Change: cd mono-1.1.13.8.tar.gz to cd mono-1.1.13.8 --edit-- It appears that was a typo in my original howto. It has been edited with the correction. |
|
|
|
|
|
|
#8 |
|
First Cup of Ubuntu
![]() Join Date: Mar 2005
Beans: 9
|
Re: HOWTO: apache2 w/ mono, xsp & mod_mono **NEW**
Hi all
Does mod_mono/xps also allow you to server asp 1.0 and 2.0 pages? Cheers Graham |
|
|
|
|
|
#9 |
|
First Cup of Ubuntu
![]() Join Date: Jun 2006
Location: MN, USA
Beans: 9
Ubuntu 6.06
|
Re: HOWTO: apache2 w/ mono, xsp & mod_mono **NEW**
|
|
|
|
|
|
#10 |
|
Dipped in Ubuntu
![]() |
Re: HOWTO: apache2 w/ mono, xsp & mod_mono **NEW**
There seems to be a problem with libglib2.0-dev.
I cant install it through apt-get. The prompt just barfs the following: josh@josh-desktop:~/download/mono-1.1.17.2$ sudo apt-get install libglib2.0-devReading package lists... Done Building dependency tree... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. Since you only requested a single operation it is extremely likely that the package is simply not installable and a bug report against that package should be filed. The following information may help to resolve the situation: The following packages have unmet dependencies: libglib2.0-dev: Depends: libglib2.0-0 (= 2.10.2-1ubuntu3) but 2.10.3-0ubuntu1 is to be installed E: Broken packages Has anyone else had this problem? |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|