Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin dashboard #26

Closed
piotr-placzek opened this issue Aug 17, 2018 · 21 comments
Closed

Admin dashboard #26

piotr-placzek opened this issue Aug 17, 2018 · 21 comments

Comments

@piotr-placzek
Copy link

piotr-placzek commented Aug 17, 2018

Hello

I just downloaded the free batflat version from the project website.

Unfortunately, the admin directory contains only the index and htaccess files. There are no directories, therefore logging into the administration panel always results in the message NOT FOUND admin/dashboard .....

@wilburforce83
Copy link

I came to ask about this too. I have just installed Batflat to try it out and after I log in I just get a 404, looked at the files and see there is only index and htaccess. Am I missing something simple? Thanks!

@klocus
Copy link
Collaborator

klocus commented Aug 17, 2018

I think that you have an issue with mod_rewirte. Do you have Apache?

@piotr-placzek
Copy link
Author

Yes. I am using the Apache/2.4.10 (Win32) OpenSSL/1.0.1h PHP/5.5.15

@wilburforce83
Copy link

wilburforce83 commented Aug 17, 2018

I didn't have https:// added so added that in, but still getting 404. I am not that great with php, so there is a good chance I am missing something here!

<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^ index.php [L] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://xxxxxxxxxxxxxxxxxxxx/$1 [R=301,L] </IfModule>

@klocus
Copy link
Collaborator

klocus commented Aug 17, 2018

@piotr-placzek @wilburforce83 do you have mod_rewrite enabled?

@wilburforce83
Copy link

wilburforce83 commented Aug 17, 2018

@piotr-placzek thanks for the quick reply, and sorry for my ignorance, I am still learning! I am hosting on a subdomain on Site Ground. They say that to enable mod_rewrite it needs to go in the .htaccess of the website.

https://www.siteground.com/kb/how_can_i_enable_modrewrite_module/

I have added this to the .htaccess in the /admin folder. Should it go in the subdomain .htaccess instead, or maybe even in the main domain /public_html/.htaccess?

i.e.

/public_html/.htaccess
/public_html/subdomain/.htaccess
/public_html/subdomain/admin/.htaccess

Many thanks for your help!

@klocus
Copy link
Collaborator

klocus commented Aug 17, 2018

RewriteEngine On is already set in .htaccess file.

@piotr-placzek
Copy link
Author

My mistake.

The rewrite_module was turned off.

However, now after giving login and password (admin / admin) in response I get a blank page (without any source code at all).

http://localhost/batflat-master/admin/dashboard/main?t=b88be7f58de0

@klocus
Copy link
Collaborator

klocus commented Aug 17, 2018

Update PHP to 5.6 or 7 ;)

@wilburforce83
Copy link

Okay, I have resolved mostly! I now have a 500 error on HTTPS, HTTP works fine, though I think I can fix that myself :) many thanks!!

@klocus
Copy link
Collaborator

klocus commented Aug 17, 2018

@wilburforce83 enable "DEV_MODE" in inc/core/defines.php and check for errors.

@wilburforce83
Copy link

@klocus Thanks, I have enable DEV_MODE to true. is there log somewhere? can't find anything obvious, thanks again for your help!

@klocus
Copy link
Collaborator

klocus commented Aug 17, 2018

You should get some error instead of 500 page. Or maybe it's because of .htaccess protection. Try remove

# Prevent directory listings
Options -Indexes

# Prevent visitors from viewing files directly
<Files "\.(sdb|md|html|txt)$">
    <IfModule !mod_authz_core.c>
        Order allow,deny
        Deny from all
        Satisfy All
    </IfModule>
    <IfModule mod_authz_core.c>
        Require all denied
    </IfModule>
</Files>

from this file and check if that is working.

@wilburforce83
Copy link

Okay, so if I manually remove the "s" everything works with no 500 errors, so it is all https:// related.

Removing the above code didn't do anything, is the https thing a simple fix that I'm missing?

@klocus
Copy link
Collaborator

klocus commented Aug 17, 2018

Please use default Batlfat's .htaccess file. If you want use SSL, add

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

after Options -Indexes

@wilburforce83
Copy link

@klocus thanks for this! I have done the changes but it hasn't done anyhting. However, I am on a subdomain, so sdo I need to write something different here:

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

To reflect that it is a subdomain?

@klocus
Copy link
Collaborator

klocus commented Aug 17, 2018

It doesn't matter if you are on subdomain.

@wilburforce83
Copy link

Thank you, I didn't think it would. I just can't get it to do anyhting other than home page in https:// everyhting works fine in HTTP:// but I need it secure.

This is what I have:

image

@klocus
Copy link
Collaborator

klocus commented Aug 17, 2018

# Prevent directory listings
Options -Indexes

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

# Prevent visitors from viewing files directly
<FilesMatch "\.(sdb\|html\|txt)$">
 <IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
Satisfy All
</IfModule>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</FilesMatch>

# URL rewrites
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(inc/\|themes/\|tmp/).*\.(php\|html)$ - [F,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]
</IfModule>

@piotr-placzek
Copy link
Author

I just reinstalled Apache and updated everything. I changed the control panel from UwAmp to Xampp. And everything is ok. Thanks for your help and patience.

@wilburforce83
Copy link

@klocus Thank you so much for all your help, but it still isn't working. I am wondering whether there is a problem with my host or something? I think I might just give up for the time being :(

@klocus klocus closed this as completed Sep 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants