설치 후 Magento 2 2.0.0-RC 관리 페이지를 찾을 수없는 방법


34

깨끗한 데이터베이스로 새로 설치되었습니다. Magento 2 의 값을 확인했습니다 : magento 2 관리자 로그인 페이지에서 오류 404를 찾을 수 없으며 괜찮습니다.

또한 관리자 로그인을 포함한 모든 버튼 / 링크가 오류 404를 찾을 수 없음 1을 표시하여 /index.php/admin을 통해 액세스하려고했습니다. 이 문제를 해결하는 방법은 무엇입니까? 그러나 여전히 찾을 수 없습니다.

설정 과정에서 "admin"을 url로 지정했습니다.

프런트 엔드가 작동 중입니다.

누군가 도울 수 있습니까?

답변:


46

나는 같은 문제에 직면했다.

그런 다음 루트 폴더에 .htaccess 파일을 추가하여 해결했습니다.

.htaccess 코드

###############################################
## overrides deployment configuration mode value
## use command bin/magento deploy:mode:set to switch modes

#   SetEnv MAGE_MODE developer

############################################
## uncomment these lines for CGI mode
## make sure to specify the correct cgi php binary file name
## it might be /cgi-bin/php-cgi

#    Action php5-cgi /cgi-bin/php5-cgi
#    AddHandler php5-cgi .php

############################################
## GoDaddy specific options

#   Options -MultiViews

## you might also need to add this line to php.ini
##     cgi.fix_pathinfo = 1
## if it still doesn't work, rename php.ini to php5.ini

############################################
## this line is specific for 1and1 hosting

    #AddType x-mapp-php5 .php
    #AddHandler x-mapp-php5 .php

############################################
## default index file

    DirectoryIndex index.php

<IfModule mod_php5.c>

############################################
## adjust memory limit

    php_value memory_limit 768M
    php_value max_execution_time 18000

############################################
## disable automatic session start
## before autoload was initialized

    php_flag session.auto_start off

############################################
## enable resulting html compression

    #php_flag zlib.output_compression on

###########################################
## disable user agent verification to not break multiple image upload

    php_flag suhosin.session.cryptua off

</IfModule>

<IfModule mod_php7.c>

############################################
## adjust memory limit

    php_value memory_limit 768M
    php_value max_execution_time 18000

############################################
## disable automatic session start
## before autoload was initialized

    php_flag session.auto_start off

############################################
## enable resulting html compression

    #php_flag zlib.output_compression on

###########################################
## disable user agent verification to not break multiple image upload

    php_flag suhosin.session.cryptua off

</IfModule>

<IfModule mod_security.c>
###########################################
## disable POST processing to not break multiple image upload

    SecFilterEngine Off
    SecFilterScanPOST Off
</IfModule>

<IfModule mod_deflate.c>

############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip

    # Insert filter on all content
    ###SetOutputFilter DEFLATE
    # Insert filter on selected content types only
    #AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript

    # Netscape 4.x has some problems...
    #BrowserMatch ^Mozilla/4 gzip-only-text/html

    # Netscape 4.06-4.08 have some more problems
    #BrowserMatch ^Mozilla/4\.0[678] no-gzip

    # MSIE masquerades as Netscape, but it is fine
    #BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

    # Don't compress images
    #SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

    # Make sure proxies don't deliver the wrong content
    #Header append Vary User-Agent env=!dont-vary

</IfModule>

<IfModule mod_ssl.c>

############################################
## make HTTPS env vars available for CGI mode

    SSLOptions StdEnvVars

</IfModule>

############################################
## workaround for Apache 2.4.6 CentOS build when working via ProxyPassMatch with HHVM (or any other)
## Please, set it on virtual host configuration level

##    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
############################################

<IfModule mod_rewrite.c>

############################################
## enable rewrites

    Options +FollowSymLinks
    RewriteEngine on

############################################
## you can put here your magento root folder
## path relative to web root

    #RewriteBase /magento/

############################################
## workaround for HTTP authorization
## in CGI environment

    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

############################################
## TRACE and TRACK HTTP methods disabled to prevent XSS attacks

    RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
    RewriteRule .* - [L,R=405]

############################################
## redirect for mobile user agents

    #RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.*$
    #RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
    #RewriteRule ^(.*)$ /mobiledirectoryhere/ [L,R=302]

############################################
## never rewrite for existing files, directories and links

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l

############################################
## rewrite everything else to index.php

    RewriteRule .* index.php [L]

</IfModule>


############################################
## Prevent character encoding issues from server overrides
## If you still have problems, use the second line instead

    AddDefaultCharset Off
    #AddDefaultCharset UTF-8

<IfModule mod_expires.c>

############################################
## Add default Expires header
## http://developer.yahoo.com/performance/rules.html#expires

    ExpiresDefault "access plus 1 year"
    ExpiresByType text/html A0
    ExpiresByType text/plain A0

</IfModule>

###########################################
## Deny access to root files to hide sensitive application information
    RedirectMatch 404 /\.git

    <Files composer.json>
        order allow,deny
        deny from all
    </Files>
    <Files composer.lock>
        order allow,deny
        deny from all
    </Files>
    <Files .gitignore>
        order allow,deny
        deny from all
    </Files>
    <Files .htaccess>
        order allow,deny
        deny from all
    </Files>
    <Files .htaccess.sample>
        order allow,deny
        deny from all
    </Files>
    <Files .php_cs>
        order allow,deny
        deny from all
    </Files>
    <Files .travis.yml>
        order allow,deny
        deny from all
    </Files>
    <Files CHANGELOG.md>
        order allow,deny
        deny from all
    </Files>
    <Files CONTRIBUTING.md>
        order allow,deny
        deny from all
    </Files>
    <Files CONTRIBUTOR_LICENSE_AGREEMENT.html>
        order allow,deny
        deny from all
    </Files>
    <Files COPYING.txt>
        order allow,deny
        deny from all
    </Files>
    <Files Gruntfile.js>
        order allow,deny
        deny from all
    </Files>
    <Files LICENSE.txt>
        order allow,deny
        deny from all
    </Files>
    <Files LICENSE_AFL.txt>
        order allow,deny
        deny from all
    </Files>
    <Files nginx.conf.sample>
        order allow,deny
        deny from all
    </Files>
    <Files package.json>
        order allow,deny
        deny from all
    </Files>
    <Files php.ini.sample>
        order allow,deny
        deny from all
    </Files>
    <Files README.md>
        order allow,deny
        deny from all
    </Files>

################################
## If running in cluster environment, uncomment this
## http://developer.yahoo.com/performance/rules.html#etags

    #FileETag none

############################################
## Add custom headers
<IfModule mod_headers.c>
    Header set X-Content-Type-Options "nosniff"
    Header set X-XSS-Protection "1; mode=block"
</IfModule>

@ Qaisar Satti : 나는 같은 문제에 직면하여 해결책을 따랐습니다. 그러나 그것은 내 문제를 해결하지 못했습니다.
— Ipsita Rout

이상한 Magento2.2.2가 .htaccess.sample을 제공하지 않았습니다 !!!! 나를 위해 일했다.
— Juliano Vargas

이것은 작동하지 않으며 이제 프런트 엔드가 더 이상 표시되지 않습니다.
— lorakeen

그것은 효과가 있지만 약 2 시간을 보냅니다
— Asad Ullah

14

아파치 다시 쓰기 모듈을 활성화하고 구성을 변경하여 모두를 허용해야합니다.

구성을 위해 다음 코드를 추가하십시오.

  <Directory /var/www/html>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            allow from all
 </Directory>

여기에서 다시 쓰기 모듈 을 활성화 하는 방법을 확인하십시오


1
그 단계를 현명하게 수행하기 위해 괭이를 설명해 주시겠습니까?
— Ipsita Rout

고마워요, 여기 있습니다 !!!, 나는 모든 곳에서 .htaccess를 가지고 있지만 Magento는 BackEnd에서 FontEnd로 작동하지 않으므로 키는 옵션 인덱스 FollowSymLinks MultiViews 및 AllowOverride All
— vanduc1102

다시 쓰기 모듈을 활성화하면 고마워했고 +1
— Sukeshini

7

pub / .htaccess를 루트 폴더에 복사하십시오.


@ Qaisar Satti : 나는 같은 문제에 직면하여 해결책을 따랐습니다. 그러나 그것은 내 문제를 해결하지 못했습니다.
— Ipsita Rout

이것은 나를 위해 일했습니다.
— dchayka

4

현재 Magento2 RC는 사용자 지정 포트를 설치하는 데 문제 가 있습니다.

이 문제를 해결하려면 88 행의 FrontNameResolver 에서 replace

$host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '';

에

$host = isset($_SERVER['HTTP_HOST']) ? parse_url($_SERVER['HTTP_HOST'], PHP_URL_HOST) : '';

이 변경 후, 브라우저가 / admin / admin / dashboard / index ....를 표시하더라도 관리자 로그인 페이지에 멈췄습니다. 그러나 @Dmitry Fedyuk 답변 (.com 추가)과 함께 작동했습니다.
— csmarvz 2016

0

최상위 도메인 (예 :)에서 Magento 백엔드 인증이 제대로 작동하지 않습니다 m2rc.
2 차 도메인을 사용하십시오 ( m2rc.com예 :).

당사 사이트를 사용함과 동시에 당사의 쿠키 정책과 개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.