Skip to content

Instantly share code, notes, and snippets.

@stognola
Last active April 3, 2018 16:50
Show Gist options
  • Save stognola/89adec2f5a453681c4ad8f540de7b429 to your computer and use it in GitHub Desktop.
Save stognola/89adec2f5a453681c4ad8f540de7b429 to your computer and use it in GitHub Desktop.
Ubuntu 16.04 : run ASP.NET with Apache
sudo apt-get update
sudo apt-get install mono-xsp4-base
sudo apt-get install apache2 mono-xsp4 mono-complete mono-apache-server4 libapache2-mod-mono mono-reference-assemblies-4.0
#add a /etc/apache2/sites-enabled as follows, you want to use an arbitrary port in this case
#<VirtualHost localhost:8089>
# ServerName localhost
# DocumentRoot /var/www/mono/
# <Directory /var/www/mono/>
# Options Indexes FollowSymLinks MultiViews
# AllowOverride All
# Order allow,deny
# Allow from all
# SetHandler mono
# DirectoryIndex index.aspx index.html
# </Directory>
#</VirtualHost>
# modify /etc/apache2/ports.conf so it listen to 8089
# configure mono server, /etc/mono-server4/mono.webapp like so
#<apps>
# <web-application>
# <name>moo!</name>
# <vpath>/</vpath>
# <path>/var/www/mono</path>
# <vhost>localhost</vhost>
# </web-application>
#</apps>
# activate mod_mono
# sudo a2enmod mod_mono
#sudo mkdir /etc/mono/registry
#sudo chmod uog+rw /etc/mono/registry
#sudo chown www-data:www-data /etc/mono/registry
# add your files in /var/www/mono and restart apache
# sudo service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment