Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm having a huge problem getting mod_mono and apache configured to work correctly. I've had this working at one time, but I can't seem to figure out where i'm going wrong. I'm using mono-server4.

I'm trying to use a seperate port from the main website. So I have in /etc/apache2/sites-available (with a link from sites-enabled) a vhost configuration that looks like this:

<VirtualHost *:9999>
  ServerName XXX
  ServerAdmin web-admin@XXX
  DocumentRoot /var/xxx

  MonoServerPath XXX "/usr/bin/mod-mono-server4"
  MonoDebug XXX true
  MonoSetEnv XXX MONO_IOMAP=all
  MonoApplications XXX "/:/var/xxx"
  <Location "/">
    Allow from all
    Order allow,deny
    MonoSetServerAlias XXX
    SetHandler mono
    SetOutputFilter DEFLATE
    SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip dont-vary
  </Location>
  <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript
  </IfModule>
</VirtualHost>

I used mono-server4-admin to create the application

mono-server4-admin --path=/var/xxx --app=/XXX --port=9999

When i start apache, it gives the error:

Syntax error on line 13 of /etc/apache2/sites-enabled/xxx:
Server alias 'XXX, not found.

This corresponds with the MonoSetServerAlias statement. So I commented it out, and when I do that apache starts. However, when I try to access the site, I get a 500 error.

The access log indicates that it's trying to access the app on port 80, rather than 9999. I'm not sure what the problem is here. Can anyone help me get figure out where I went wrong?

My mono-server4-hosts.conf contains this:

# start /etc/mono-server4/conf.d/RMRSite/10_XXX
     Alias /XXX "/var/xxx"
     AddMonoApplications default "/XXX:/var/xxx"
       <Directory /var/xxx>
         SetHandler mono
           <IfModule mod_dir.c>
              DirectoryIndex index.aspx
           </IfModule>
       </Directory>
# end /etc/mono-server4/conf.d/XXX/10_XXX

Also, my /etc/mono-server4/conf.d/XXX/10_XXX contains this:

This is the configuration file
for the XXX virtualhost
path = /var/xxx
alias = /XXX
vhost = localhost
port = 9999
share|improve this question

1 Answer 1

up vote 0 down vote accepted

Stupid question, do you have this in your Apache config?

NameVirtualHost *:9999
Listen 9999
share|improve this answer
    
Yes. Sorry, tried to include all info I could but didn't want it to be too long. If that were the problem it would be a different error though. –  Erik Funkenbusch Jun 28 '12 at 22:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.