500 Internal Server Error when installing magento2.2.2
-
25-12-2020 - |
Вопрос
I am trying to install Magento 2.2.2 on my local Windows environment with WAMP. But it gives me a 500 Internal Server Error. When I replace the previous version of htaccess
file it does work. Would that be the issue?
Rewrite engine is on and the module is loaded.
Error log:
Invalid command '<IfVersion', perhaps misspelled or defined by a module not included in the server configuration
I have tried to enable LoadModule version_module modules/mod_version.so
to make it work but now when the installation runs, in between it responds in my console that it's false
after a few seconds. When I try to refresh, it starts the remaining installation but I have to refresh several times to complete the installation. I don't know if Magento is installed successfully or not during this process.
When I go to the admin it works, but I get console JS errors. The front-end still loads without CSS.
I tried to install it several times but every time I wind up with this error
Решение
Ok Finally.... here is the process i did follow to get rid from this.
Step1:: Please make sure that LoadModule version_module modules/mod_version.so
is loaded from httpd.conf
file to resolve Invalid command '<IfVersion', perhaps misspelled or defined by a module not included in the server configuration
error.
Step2::
Please make sure that below variable value should be set as
max_execution_time = 1800
max_input_time = 1800
memory_limit = 1024M
Step3::(Optional)
Creat virtual host.
add below code in your file path :: D:\wamp64\bin\apache\apache2.4.18\conf\extra\httpd-vhosts.conf
Path may vary as per your installation
<VirtualHost *:80>
ServerName demomage222
ServerAlias www.demomage222.com
DocumentRoot D:/wamp64/www/mage222
<Directory "/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
Make entry in host file like below.
host file path for me(may different for you) :: C:\Windows\System32\drivers\etc\hosts
127.0.0.1 www.demomage222.com
Другие советы
I was also facing the same issue when i was installing Magento 2.2 on WAMP. I changed the PHP version to PHP 7.1 and then restarted the installation. Things worked for me.
Locate Options +FollowSymLinks
in .htaccess
of your Magento root and change it to: Options +SymLinksIfOwnerMatch
Do that for /pub/static/.htaccess
and /pub/media/.htaccess
as well.
EDIT
The described error points to mod_version not being enabled.
To enable it go to http.conf
in the conf
folder and find a line that has mod_version in it.
Remove "#" from the beginning to uncomment it.
Then restart apache.
If you are facing it while installation it could be A Permissions Error.
In most cases, a 500 Internal Server Error is due to an incorrect permission on one or more files or folders. set folder permission to 0775
sudo chmod -R 775 /path_to_magent/Folder