I´m attempting to setup a production Server for rails 3.1 with Apache and Phusion Passenger.

It had been simple to get my application ready to go, however I observed, when I click a hyperlink or attempt to acces ActiveAdmin in /admin, I´m alway rerouted using the absolute Server Path. So rather than application.domain.com/admin the url turns to application.domain.com/var/www/vhosts/domain.com/application/public/admin

After which...

Routing Error    
No route matches [GET] "/var/www/vhosts/domain.com/httpdocs/live/public/admin/login"

Now I'm able to take away the wrong Path Segment "/var/www/vhosts/domain.com/httpdocs/live/public/" and give a "/" in the finish, then your Page turns up.

The subdomain is pointing towards the public folder, I already attempted different ways to deploy without subdomain etc. however i always finish track of this issue.

Exactly the same application is running on Heroku, what exactly shall we be held doing wrong?