• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Magento 2.x 502 Bad Gateway Error on Ubuntu

mdraselkhan

New Pleskian
Hello,

I'm using AWS Lightsail Plesk Hosting Stack on Ubuntu. After installing Elaasticsearch 2.x that is mandatory to install Magento 2 on this same server, after successfully installed this, getting 502 Bad Gateway. The developer guy was told me to contact the server admin or OS system's license provider.

I use PHP 7.4, getting this error

{"0":"Notice: Trying to access array offset on value of type null in \/var\/www\/vhosts\/applogik.dk\/kamme.applogik.dk\/vendor\/magento\/framework\/App\/AreaList.php on line 78","1":"#1 Magento\\Framework\\App\\AreaList->getCodeByFrontName() called at [vendor\/magento\/framework\/App\/Http.php:111]\n#2 Magento\\Framework\\App\\Http->launch() called at [generated\/code\/Magento\/Framework\/App\/Http\/Interceptor.php:24]\n#3 Magento\\Framework\\App\\Http\\Interceptor->launch() called at [vendor\/magento\/framework\/App\/Bootstrap.php:261]\n#4 Magento\\Framework\\App\\Bootstrap->run() called at [index.php:39]\n","url":"\/index.php\/","script_name":"\/index.php","report_id":"79450960494d77faba9b567627cd0f085b1053a63e49ef9cd9ef3d13bfb67b26"}

If switch to php 8.0, getting this error

[Thu Feb 11 12:58:50.757032 2021] [proxy_fcgi:error] [pid 13308] [client 103.25.251.243:46740] AH01071: Got error 'PHP message: PHP Deprecated: Method ReflectionParameter::getClass() is deprecated in /var/www/vhosts/applogik.dk/kamme.applogik.dk/vendor/magento/framework/Code/Reader/ClassReader.php on line 36PHP message: PHP Deprecated: Method ReflectionParameter::getClass() is deprecated in /var/www/vhosts/applogik.dk/kamme.applogik.dk/vendor/magento/framework/Code/Reader/ClassReader.php on line 36PHP message: PHP Deprecated: Method ReflectionParameter::getClass() is deprecated in /var/www/vhosts/applogik.dk/kamme.applogik.dk/vendor/magento/framework/Code/Reader/ClassReader.php on line 36PHP message: PHP Deprecated: Method ReflectionParameter::getClass() is deprecated in /var/www/vhosts/applogik.dk/kamme.applogik.dk/vendor/magento/framework/Code/Reader/ClassReader.php on line 36PHP message: PHP Deprecated: Method ReflectionParameter::getClass() is deprecated in /var/www/vhosts/applogik.dk/kamme.applogik.dk/vendor/magento/framework/Code/Reader/ClassReader.php on line 36PHP message: PHP Deprecated: Method ReflectionParameter::getClass() is deprecated in /var/www/vhosts/applogik.dk/kamme.applogik.dk/vendor/magento/framework/Code/Reader/ClassReader.php on line 36PHP message: PHP Deprecated: Method ReflectionParameter::getClass() is deprecated in /var/www/vhosts/applogik.dk/kamme.applogik.dk/vendor/magento/framework/Code/Reader/ClassReader.php on line 36PHP message: PHP Deprecated: Method ReflectionParameter::getClass() is deprecated in /var/www/vhosts/applogik.dk/kamme.applogik.dk/vendor/magento/framework/Code/Reader/ClassReader.php on line 36PHP message: PHP Deprecated: Method ReflectionParameter::getClass() is deprecated in /var/www/vhosts/applogik.dk/kamme.applogik.dk/vendor/magento/framework/Code/Reader/ClassReader.php on line 36PHP message: PHP Deprecated: Method ReflectionParameter::getClass() is deprecated in /var/www/vhosts/applogik.dk/kamme.applogik.dk/vendor/magento/framework/Code/Reader/ClassReader.php on line 36PHP message: PHP Deprecated: Method ReflectionParameter::getClass() is deprecated in /var/www/vhosts/applogik.dk/kamme.applogik.dk/vendor/magento/framework/Code/Reader/ClassReader.php on line 36PHP message: PHP Deprecated: Method ReflectionParameter::getClass() is deprecated in /var/www/vhosts/applogik.dk/kamme.applogik.dk/vendor/magento/framework/Code/Reader/ClassReader.php on line 36PHP message: PHP Deprecated: Method ReflectionParameter::getClass() is deprecated in /var/www/vhosts/applogik.dk/kamme.applogik.dk/vendor/magento/framework/Code/Reader/ClassReader.php on line 36PHP message: PHP Deprecated: Method ReflectionParameter::getClass() is deprecated in /var/www/vhosts/applogik.dk/kamme.applogik.dk/vendor/magento/framework/Code/Reader/ClassReader.php on line 36', referer: https://kamme.applogik.dk/index.php/

Please help me to fix these issues. Thanks!
 
Olá,

Só leigo, mas pesquiso muito e comparo muito os detalhes ... Tradução e inglês não nativo, se você não entender me avise.

Partindo de um ponto, vi em outro post seu @mdraselkhan que veio do cPanel e eu vim do directadmin e funcionou corretamente (Magento 2.4.0).

Portanto, tenho certeza de que o erro está em alguma configuração de painel Plesk padrão

Se Magento 2.4.0 o erro aparece erro 500 ou erro 502, eu tive sucesso na mudança

Domínios> seu domínio> configurações nginx e Apache> desmarque "Restringir capacidade de seguir links simbólicos". Se for selecionado a partir do erro.

Sobre Magento 2.4.2

Erro 502 mesmo se você fizer isso, pelo menos não erro 500, se você desmarcar os links simbólicos.

No entanto, se você olhar para este magento, é OBRIGATÓRIO que você configure o Pub como pasta Root.

Domínios> seu domínio> Configurações de hospedagem> Documento raiz> <pasta magento> / pub

Você tem que fazer isso porque o root agora não tem mais os arquivos de índice e o .htaccess é diferente nesta versão 2.4.2, se parece com isto,

RewriteEngine em
RewriteCond% {REQUEST_URI}! ^ / Pub /
RewriteCond% {REQUEST_URI}! ^ / Configuração /
RewriteCond% {REQUEST_URI}! ^ / Atualizar /
RewriteCond% {REQUEST_URI}! ^ / Dev /
RewriteRule. * / Pub / $ 0 [L]
DirectoryIndex index.php

[USER = 173885] @Peter Debik [/ USER] desta forma, peço sua ajuda, se possível claro, ajude-nos a entender o que você precisa consertar no painel, pois é alguma configuração que só falta.
 
Hello,

Just a layman, but I research a lot and compare the details a lot ... Translation and non-native English, if you don't understand let me know.

Starting from one point, I saw in another post your @mdraselkhan that came from cPanel and I came from directadmin and it worked correctly (Magento 2.4.0).

So, I'm sure the error is in some standard Plesk panel configuration

If Magento 2.4.0 the error appears error 500 or error 502, I was successful in changing

Domains> your domain> nginx and Apache settings> uncheck "Restrict ability to follow symbolic links". If selected from the error.

About Magento 2.4.2

Error 502 even if you do this, at least not error 500, if you deselect symbolic links.

However, if you look at this magento, it is MANDATORY that you set up Pub as the Root folder.

Domains> your domain> Hosting settings> Root document> <magento folder> / pub

You have to do this because root now doesn't have the index files anymore and .htaccess is different in this version 2.4.2, it looks like this,

RewriteEngine em
RewriteCond% {REQUEST_URI}! ^ / Pub /
RewriteCond% {REQUEST_URI}! ^ / Configuração /
RewriteCond% {REQUEST_URI}! ^ / Atualizar /
RewriteCond% {REQUEST_URI}! ^ / Dev /
RewriteRule. * / Pub / $ 0 [L]
DirectoryIndex index.php


@Peter Debik this way, I ask for your help, if possible of course, help us understand what you need to fix on the panel, as it is some configuration that is just missing.
 
Back
Top