Y
Y
Yuri Voronin2020-01-14 16:23:51
1C-Bitrix
Yuri Voronin, 2020-01-14 16:23:51

Why are standard scripts and styles not connected in the Bitrix admin panel?

Hello.
Deployed a Bitrix project on OpenServer.
php 7.1-x64
apache 2.4-php_7.0-7.1-x64
mysql 5.6-x64

In the admin panel, everything looks something like this
5e1dc052bf123452472491.png
. In the console, a bunch of 403 files are issued, for example /bitrix/themes/.default/compatible.css
Match or not, then everyone files are in the path folder .default
Because of what could be the problem? Blocking by ip in the settings is not worth it.
.access.php

$PERM["personal"]["7"]="W";
$PERM["personal"]["8"]="W";
$PERM["catalog"]["7"]="W";
$PERM["catalog"]["8"]="W";
$PERM["news"]["7"]="W";
$PERM["news"]["8"]="W";
$PERM["about"]["7"]="W";
$PERM["about"]["8"]="W";
$PERM["index.php"]["7"]="W";
$PERM["index.php"]["8"]="W";
$PERM["desktop_app"]["*"]="D";
$PERM["online"]["*"]="R";
$PERM["pub"]["5"]="T_8";
$PERM["upload"]["5"]="T_8";
$PERM["/"]["*"]="R";
$PERM["admin"]["7"]="R";
$PERM["admin"]["6"]="R";
$PERM["admin"]["*"]="D";
$PERM["wizards"]["*"]="D";

htaccess
Options -Indexes 
ErrorDocument 404 /404.php

<IfModule mod_php5.c>
  php_flag allow_call_time_pass_reference 1
  php_flag session.use_trans_sid off
</IfModule>

<IfModule mod_rewrite.c>
  Options +FollowSymLinks
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !/bitrix/urlrewrite.php$
  RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L]
  RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>

<IfModule mod_dir.c>
  DirectoryIndex index.php index.html
</IfModule>

<IfModule mod_expires.c>
  ExpiresActive on
  ExpiresByType image/jpeg "access plus 3 day"
  ExpiresByType image/gif "access plus 3 day"
</IfModule>

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Y
Yuri Voronin, 2020-01-15
@yuraSco

In the apache config it was necessary to remove:

<LocationMatch "/\.(?!well-known)">
    Require             all denied
</LocationMatch>

A
Alexander, 2020-01-14
Madzhugin @Suntechnic

There, most likely, nginx gives statics, so htaccess has nothing to do with it.
Perhaps there is a rule in the nginx settings that prohibits access to these files.
Or the files themselves are not readable by the server, simply because of the rights to the files / folders themselves (I don’t know how it works in Windows)

R
RecentForce99, 2022-03-10
@RecentForce99

Those with nginx or apache + nginx, please switch to pure apache otherwise the solution above won't help

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question