Wiki

Clone wiki

WideMarginWebsite / Setup Website

Install apache and mod-mono

  1. sudo apt-get install libapache2-mod-mono mono-apache-server4
  2. sudo apt-get install apache2

Setup the website

  1. cd /var/www
  2. sudo apt-get install mercurial
  3. clone website: sudo hg clone https://trampster@bitbucket.org/trampster/widemarginwebsite
  4. cd widemarginwebsite
  5. sudo xbuild WideMarginWebsite.sln
  6. Create the host file as /etc/apache2/sites-available/widemarginwebsite with the following content
<VirtualHost *:80>
	ServerAdmin webmaster@localhost
	ServerName widemarginwebsite
        MonoAutoApplication disabled
        AddHandler mono .aspx ascx .asax .ashx .config .cs .asmx .axd
        MonoApplications "/:/var/www/widemarginwebsite"
        MonoServerPath default /usr/bin/mod-mono-server4

	DocumentRoot /var/www/widemarginwebsite
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/widemarginwebsite>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
		SetHandler mono
                DirectoryIndex index.aspx index.html
	</Directory>

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined

</VirtualHost>

Register the site and restart

  1. Register the new site: sudo a2ensite widemarginwebsite
  2. Remove the default site: sudo a2dissite default
  3. Restart Apache, sudo /etc/init.d/apache2 restart

Updated