Skip to content

Instantly share code, notes, and snippets.

@yetanotherchris
Created April 22, 2013 09:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yetanotherchris/5433557 to your computer and use it in GitHub Desktop.
Save yetanotherchris/5433557 to your computer and use it in GitHub Desktop.
Apache site settings for Mono MVC3
<VirtualHost *:80>
ServerAdmin webmaster@localhost
AddHandler mono .aspx ascx .asax ashx .config .cs asmx .axd
MonoDebug default true
MonoSetEnv default MONO_IOMAP=all
MonoApplications "/:/var/www"
MonoServerPath default /usr/bin/mod-mono-server4
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
SetHandler mono
</Directory>
<DirectoryMatch "/(bin|App_Code|App_Data|App_GlobalResources|App_LocalResources)/">
Order deny,allow
Deny from all
</DirectoryMatch>
# remove this section if you don't need it
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 ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment