4

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
  • 531
  • 1
  • 9
  • 31

3 Answers3

1

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

Kedare
  • 1,766
  • 4
  • 20
  • 36
  • 1
    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` – abatishchev Nov 17 '10 at 07:03
1

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

abatishchev
  • 531
  • 1
  • 9
  • 31
1

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
Jon Lin
  • 1,343
  • 9
  • 21
Ariel
  • 11
  • 1