Magento2.4.1 502 bad gateway

Hi All

I am installing Magento 2.4.1 using the following guide (some of the steps excluded as I am trying to install on plesk managed ubuntu20.04

Current host: ubuntu20.04 with plesk installed by hosting provider.
server spec is 4cpu with 8gb memory
as you are familier with plesk it allows to manage multiple domain, which creates following folder structure
/var/www/vhosts/<domain.com>/httpdocs/
this is where magento installed successfully.

I have to find lot of blogs and managed to installed magento but while trying to access url first it throws
500 internal server but wen further by using allowoveride all settings
now its showing in the logs
code message Source
404 Get /favicon.ico HTTP/1.0 Apache SS/TLS Access
another log
message Source
21289#0: *22 upstream sent too big header while reading response header from upstream nginx error

Any help would be great.
Also is it recommended to install magento own its own? or using mixture of plesk is fine.

put this in your apache (httpd) vhost configuration:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Require all granted

Hi there thank you for ur reply. It didn’t work but I finally installed Ubuntu on its own.
I really like the documentation you have provided on digitalstartup, its really excellent.

Is there any guide to secure ubuntu and Magento as per best-practice?