Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Nov 28, 2011 3:12 am 
Offline
Senior Newbie

Joined: Thu Nov 17, 2011 6:20 pm
Posts: 7
I set up nginx and got my wordpress blog up running today. I configured everything and thought it was fine, until I tried logging in at a later time and could not log in.

I followed the steps here http://codex.wordpress.org/Resetting_Your_Password to reset a user's password via the mysql command line but still cannot log in.

The problem is that after typing in my password at the login page (www.domain.com/blog/wp-login.php), it doesn't say whether or not the user/password combination is incorrect, it just reloads the php page. So I think I might have misconfigured nginx somewhere.

That said, here are my server configurations:

Code:
    server {
        listen       80;
        server_name  www.domain.com *.domain.com;
        rewrite ^(.*) http://domain.com$1 permanent;
    }
    server {
        listen       80;
        server_name  domain.com;

        root   /var/www/htdocs;
        index  index.php index.html index.htm;

        # If filename doesn't exist, take the request and pass to wordpress
        # as a paramater
        location / {
            if (!-e $request_filename) {
               # This line is required or else permalinks will fail
               #rewrite ^/blog/(.+)$ /blog/index.php?q=$1 last;
               rewrite ^/(.+)$ /index.php?q=$1 last;
            }
        }

        # Pass all .php files onto a php-fpm/php-fcgi server.
        location ~ \.php$ {
            #try_files $uri $uri/ /index.php?q=$uri&$args;
            try_files $uri =404; # vulnerability workaround

            include /usr/local/nginx/conf/fastcgi_params;
            fastcgi_index index.php;
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param PATH_INFO $fastcgi_script_name;
        }

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }


If it helps, I have my blog placed at domain.com/blog, but it's set up so that domain.com shows the latest posts.

Does anyone have a clue? Or is this not a nginx issue? I really don't want to have to reinstall wordpress if possible :(

I can PM the actual domain if anyone is willing to take a look.

Edit: I should add that I don't have a mail server set up on my OS, so "Lost your password?" option does not work.


Top
   
 Post subject:
PostPosted: Mon Nov 28, 2011 3:21 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Sounds like a cookie issue to me, check out http://codex.wordpress.org/Editing_wp-c ... kie_Domain

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Mon Nov 28, 2011 4:29 am 
Offline
Senior Newbie

Joined: Thu Nov 17, 2011 6:20 pm
Posts: 7
I finally got it. cookies wasn't the problem but it led me to the solution. I found this link where someone has the same problem: http://wordpress.stackexchange.com/questions/21282/wordpress-backend-login-failed-with-the-correct

and one of the comments is:

Quote:
I've had an issue before where when taking a WP site from a test domain to the live one, I forgot to change the server address in the database so it kept trying to redirect me back to the test server's domain until I noticed and changed it.


So I did an mysql select on my site's url, and lo and behold it was set to my test server. I changed the values via mysql command line and I can now log in.

Thank you!!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group