Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need testing the performance of the reserved area of my website. I want use Siege for this goal.

For accessing to reserved area you must be logged to my site.

How can I send with Siege a Login-Cookie to my web application ?

share|improve this question
up vote 14 down vote accepted

It's only mentioned in the default .siegerc file (and not in the online manual or man page), but:

# Login URL. This is the first URL to be hit by every siege
# client. This feature was designed to allow you to login to 
# a server and establish a session. It will only be hit once
# so if you need to hit this URL more then once, make sure it
# also appears in your urls.txt file.
# ex: login-url = POST name=jeff&pass=foo
# login-url = 

So you're not exactly pre-setting the login cookie. Instead, you're instructing each siege worker to login to your site once before any other requests, and they will retain their authenticated status until siege terminates.

Alternatively, you could set the user-agent to a special string, and then watch for that special user agent in your authentication code and automatically log that visitor in.

share|improve this answer
It works! Thank you. – alesdario Sep 7 '11 at 14:33
Awesome! Thanks so much. – Clint Nov 3 '11 at 16:10
How does this work with authenticity_token, such as you find in Rails? – ewalk Sep 5 '13 at 15:49
No idea... give it a shot and report back? If it's a token embedded in a hidden field in the login form, then it should work just like any other user visiting and logging in. – Ian Sep 6 '13 at 16:56
I'm pretty sure siege doesn't first fetch the login-url page, it just posts to it. So if there's a token there, it doesn't know about it. I'm also trying to find a way to get this to work. – tubaguy50035 Sep 14 '15 at 19:07

Your Answer


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.