Magento 2空白管理员新安装

I use Windows 10. I am trying to install Magento 2 using XAMPP. My admin screen is blank and I get these errors:

Refused to apply style from '' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. localhost/:1 Refused to apply style from 'http://localhost/Magento2/pub/static/version1559567140/adminhtml/Magento/backend/en_US/jquery/jstree/themes/default/style.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. localhost/:1 Refused to apply style from 'http://localhost/Magento2/pub/static/version1559567140/adminhtml/Magento/backend/en_US/extjs/resources/css/ext-all.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. localhost/:1 Refused to apply style from 'http://localhost/Magento2/pub/static/version1559567140/adminhtml/Magento/backend/en_US/extjs/resources/css/ytheme-magento.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. localhost/:1 Refused to apply style from 'http://localhost/Magento2/pub/static/version1559567140/adminhtml/Magento/backend/en_US/extjs/resources/css/ext-all.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. localhost/:1 Refused to apply style from 'http://localhost/Magento2/pub/static/version1559567140/adminhtml/Magento/backend/en_US/jquery/jstree/themes/default/style.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. localhost/:1 Refused to apply style from 'http://localhost/Magento2/pub/static/version1559567140/adminhtml/Magento/backend/en_US/extjs/resources/css/ytheme-magento.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. require.js:1 Failed to load resource: net::ERR_CONNECTION_RESET mixins.js:1 Failed to load resource: the server responded with a status of 404 (Not Found) requirejs-config.js:536 Uncaught ReferenceError: require is not defined at requirejs-config.js:536 opensans-400.woff2:1 Failed to load resource: the server responded with a status of 404 (Not Found) opensans-400.woff:1 Failed to load resource: the server responded with a status of 404 (Not Found)

Blank admin

Step 1: If you use windows machine Please change the path on this location "vendor/magento/framework/view/element/template/file/validator.php"

From $realPath = $this->fileDriver->getRealPath($path); To $realPath = str_replace('\', '/', $this->fileDriver->getRealPath($path));

Step 2: Check Your root .htaccess Remove IfVersion

Step 3: Remove IfVersion from pub/.htaccess and pub/Static/.htaccess

Hope working as per acceptation. If you face any problem Please tell me.

Hope no need of any code change. You already done installation successfully right.? Please check below things are proper in your side.

  • check rewrite a2enmod is enabled or not.
  • Try to re run your deployment command again and give necessary permissions. for your local you can have full permissions for var/,generate/,app/etc/,pub/static (remember to remove app/etc full permission when you going live)
  • Note for magento2.3 you need php7.2 support

Hope this will help you out