How to install Mono XSP as a daemon on Debian?

5,574

Solution 1

start-stop-daemon should be appended with --background

Solution 2

XSP isn't supposed to be used in production, it's a development server.

For production, take a look at mod_mono: http://www.mono-project.com/Mod_mono

Solution 3

Command to start as deamon:

sudo /etc/init.d/mono-xsp4 start

you might need to configure /etc/xsp4/debian.webapp

like this:

<apps>
  <web-application>
    <name>test</name>
    <vpath>/test</vpath>
    <path>/var/www/xsp4</path>
  </web-application>
</apps>

you can this configuration file manualy or use command: sudo mono-xsp4-admin --path:/realPath

you can restart:

sudo /etc/init.d/mono-xsp4 restart
Share:
5,574

Related videos on Youtube

abatishchev
Author by

abatishchev

Updated on September 17, 2022

Comments

  • abatishchev
    abatishchev over 1 year

    I want XSP to run on my virtual Debian 5 as a daemon.

    How can I do that?

    I tried next:

    $ sudo cp /etc/init.d/skeleton /etc/init.d/xsp
    

    updated the script properly:

    PATH=/sbin:/usr/sbin:/bin:/usr/bin
    DESC="Mono XSP4"
    NAME=xsp4
    DAEMON=/usr/bin/$NAME
    DAEMON_ARGS="--port 80 --nonstop --root /home/godfather/Projects/Test"
    PIDFILE=/var/run/$NAME.pid
    SCRIPTNAME=/etc/init.d/$NAME
    

    then:

    $ sudo update-rc.d xsp defaults
    

    But after system restart it becomes stuck on next:

    xsp
    Listening on address: 0.0.0.0
    Root directory: /home/godfather/Projects/Test
    Listening on port: 80 (non-secure)
    

    That's all.

    It has the same output if run it in user mode and without --nonstop:

    xsp
    Listening on address: 0.0.0.0
    Root directory: /home/godfather/Projects/Test
    Listening on port: 80 (non-secure)
    Hit Return to stop the server.
    

    Is it XSP bug?

  • abatishchev
    abatishchev over 13 years
    In fact, in your case Apache will handle user requests and anyway via mod_mono will redirect them to XSP: The module passes off requests for ASP.NET pages to an external program, mod-mono-server, which actually handles the requests