0

I am trying to get mono to work so I can load my apache2 web page from visual studio.

I have a server that is connected to the network and I can't seem to get visual studio to load to the server. I am not sure if I have Mono placed in the wrong file or if I am linking it up wrong. If you know how to place the mono file and which one I actually need (I used Mono 4.5 and placed the conf file in /etc/apache2) I would really appreciate it.

Response to @Letizia,

If by include you mean did I move the file, Yes, I used

  mv /etc/mono/mono.conf /etc/apache2/ 

If I go to the desktop and look at the files I can see the mono 4.5 file in the apache2 folder. However, do I need to move the mono web.conf to the apache2.conf?

I don't know, something doesn't seem right about that setup, adding more code to the Apache2 conf file.

Like I said, the mono 4.5 file is in the etc/apache2 folder, next to config-available folder and conf-enabled folder.

Another thing that is holding me up is that my network is not on the 127.0.0.1 (localhost) my localhost has a different 192.168.x.x because I am behind two routers.

I have the network taken care of and port 80 is forwarded and secure.

I just think I am missing something and I can't put my finger on it.

Maybe is in the configuration of the web form when I get ready to deploy my page from visual studio. Like, if I have the server and file paths correctly inputted. That too has raised a question or two in me.

21
  • Did you include /etc/apache2/mod_mono.conf in apache2.conf?
    – Lety
    Oct 1, 2014 at 7:19
  • Yes, look at my edit.
    – bri_ryche
    Oct 1, 2014 at 15:59
  • AAAAAAAAAAAAAAAAA. YOU JUST OVERWROTE YOUR APACHE CONFIG?!?!??
    – Kaz Wolfe
    Oct 1, 2014 at 16:28
  • NO, I did not over write anything...Apache still works...The folder is in apapche2, I didn't place anything in the apache2 config yet.the code was an typo, I didn't place it in etc/apache2/apache2.conf. I placed it in etc/apache2
    – bri_ryche
    Oct 1, 2014 at 16:31
  • Oh, thank god. You got me worried there. Can you edit that please?
    – Kaz Wolfe
    Oct 1, 2014 at 16:39

2 Answers 2

0

It sounds like Mono is an Apache mod, akin to PHP.

To enable it, only run a2enmod mono.

3
  • I will try it, but like I said above, I did not place anything in the apache2 conf file. I just moved the mono 4.5 folder over to /etc/apache2 folder, so apache is still running fine and my site default page is till visible
    – bri_ryche
    Oct 1, 2014 at 16:38
  • I get this error, :~$ sudo a2enmod mono ERROR: Module mono does not exist!
    – bri_ryche
    Oct 1, 2014 at 16:42
  • @bri_ryche You need to install the module: sudo apt-get install libapache2-mod-mono
    – Dan
    Oct 7, 2014 at 16:54
0

If you're still having trouble, do these step by step to install pre-requisites to run ASP.NET pages using apache webserver

:~$ apt-get install apache2
:~$ apt-get install mono-complete
:~$ apt-get install mono-apache-server2
:~$ apt-get install libapache2-mod-mono

Now, enable the module in apache

:~$ a2enmod mod_mono

Try enabling automatically when apache starts

:~$ a2enmod mod_mono_auto

Now, restart the server as usual

:~$ /etc/init.d/apache2 restart

Now, write some aspx pages and host it in standard directory /var/www and access using http://localhost/myfile.aspx

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .