Jump to the post that solved this thread.
Solved: 5 Years, 10 Months, 1 Week ago After the login to the ACP error 404
#1
Solved: 5 Years, 10 Months, 1 Week ago
Hello, 
i've installed Nginx, and succesfully installed MyBB Wink

But when i try to login into the ACP the url make strange changes....
The forum is in the sub directory /forum/

On the ACP's login page the url is http://www.hexelgaming.eu/forum/admin/index.php

After the login the url change into: http://www.hexelgaming.eu/forum/admin/in.../index.php
and give a 404 Not Found error...

I think you can try this yourself... just try to do a fake login into my ACP, you can try whit every username/password, the redirect will be the same....


This is a fresh installed MyBB

This is my site .conf of nginx:
server {
        listen       80;
        server_name  localhost *.hexelgaming.eu;
		root /var/www/hexelgaming.eu/html;
		index index.php index.html index.htm;

        #error_page  404              /404.html;

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

		location ~ \.php$ {
            try_files $uri =404;
            fastcgi_intercept_errors on;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index  index.php;
            fastcgi_param  PATH_INFO $fastcgi_script_name;
            include fastcgi_params;
		}
		
			
	location /forum/ {
		server_tokens off;
		index index.html index.htm index.php;
		rewrite ^/forum-([0-9]+)\.html$ /forumdisplay.php?fid=$1;
		rewrite ^/forum-([0-9]+)-page-([0-9]+)\.html$ /forumdisplay.php?fid=$1&page=$2;
		rewrite ^/thread-([0-9]+)\.html$ /showthread.php?tid=$1;
		rewrite ^/thread-([0-9]+)-page-([0-9]+)\.html$ /showthread.php?tid=$1&page=$2;
		rewrite ^/thread-([0-9]+)-lastpost\.html$ /showthread.php?tid=$1&action=lastpost;
		rewrite ^/thread-([0-9]+)-nextnewest\.html$ /showthread.php?tid=$1&action=nextnewest;
		rewrite ^/thread-([0-9]+)-nextoldest\.html$ /showthread.php?tid=$1&action=nextoldest;
		rewrite ^/thread-([0-9]+)-newpost\.html$ /showthread.php?tid=$1&action=newpost;
		rewrite ^/thread-([0-9]+)-post-([0-9]+)\.html$ /showthread.php?tid=$1&pid=$2;
		rewrite ^/post-([0-9]+)\.html$ /showthread.php?pid=$1;
		rewrite ^/announcement-([0-9]+)\.html$ /announcements.php?aid=$1;
		rewrite ^/user-([0-9]+)\.html$ /member.php?action=profile&uid=$1;
		rewrite ^/calendar-([0-9]+)\.html$ /calendar.php?calendar=$1;
		rewrite ^/calendar-([0-9]+)-year-([0-9]+)\.html$ /calendar.php?action=yearview&calendar=$1&year=$2;
		rewrite ^/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ /calendar.php?calendar=$1&year=$2&month=$3;
		rewrite ^/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html$ /calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4;
		rewrite ^/calendar-([0-9]+)-week-(n?[0-9]+)\.html$ /calendar.php?action=weekview&calendar=$1&week=$2;
		rewrite ^/event-([0-9]+)\.html$ /calendar.php?action=event&eid=$1;
		rewrite ^/archive/index.php/forum-([0-9]+)\.html$ /forum/archive/index.php?forum-$1.html;
		rewrite ^/archive/index.php/thread-([0-9]+)\.html$ /forum/archive/index.php?thread-$1.html;

	location ~ /forum/(inc|uploads/avatars) {
			deny all;
        }    
	location ~ /forum/\.ht {
			deny all;
        }

    }
}

Someone know a solution?
Thank you for the help Wink
Reply
#2
Solved: 5 Years, 10 Months, 1 Week ago
this post should have the clue.
Reply
#3
Solved: 5 Years, 10 Months, 1 Week ago
(2015-12-09, 11:30 AM).m. Wrote: this post should have the clue.

Thank you very much, now it work Big Grin
I've edited the post action method on the login form [./admin/inc/class_page.php (line: 475)]

Before: 
<form method="post" action="{$_SERVER['PHP_SELF']}{$query_string}">

After:
<form method="post" action="{$query_string}">

Now i can access the ACP Wink
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)