I decided to reword and improve previous question which I closed, because it got pretty bad score and got burried because of that.
So, I installed few days ago an Ubuntu 14.04 on my VPS (had 12.04 before) . I configured Apache2 and PHP, uploaded my website there and everything seemed to work ok, but I just discovered that I cannot log in to my website. So now charactersitics:
The problem exists only on this server, this is not a problem with PHP script itself as it works locally just fine.
Drupals CLI (Drush) works just fine. I can use it to generate one-time login link and login with it, but strange things happen then, like admin menu is at the beginning, and after refreshing - disappears. I have session cookies, and can access admin pages, so this doesn't seem to be a problem with sessions. However every change I will try to made - will not be done. After sending form, everything will go back to what it was. So this doesn't seem to be a problem with sessions. No errors occurs.
Apache log have no errors. Drupal itself also have no errors in its log. mysql.err and mysql.log are empty.
On this server I have also installed Redmine, which is based on Ruby on Rails, and I'm using Passenger mod to run it - and it works ok, the problem not occurs, so it's probably something with PHP .
MySQL user have proper privileges, he can write to database, his credentials are used by Drush (CLI) and it works as expected (from the command line).
It seems like PHP executed from http cannot make any changes in database, however database is perfectly accessible from CLI with the same credentials. It looks like some misconfiguration but is very hard to track down, as it doesn't give away anything in logs. Therefore I have not too much to show, but I can paste my php.ini from /etc/php5/apache2/php.ini , but it is default - I didn't change anything there, which baffling me even more - http://pastebin.com/ZjiSSSht . If you need any more data from this server, please let me know in comment, I'm not sure what else may be useful.
System: Ubuntu 14.04, Apache 2.4.7, PHP 5.5.9-1ubuntu4.2 , mysql Ver 14.14 Distrib 5.5.37
It appears the problem was with not enabled rewrite module. As I had working pretty urls on all websites, never occured to me, that this may be a problem ^ .