Install without nginx? Goal: magento 2.4 install

We rebuild crontab -I every time Hestia updates…

Hi Falzo. Thanks for pointing that out. I got that code from a tutorial of someone who was likely settingup a standalone VPS for Magento. Not really what we would all do here within Hestiacp.

Sorry for the error in that instruction. I really am just starting out at this. And don’t worry, this website/VPS is only for me. But I do want to learn how to do things properly.

so this is the problem line?
sudo chown -R :www-data .

I did run all the code under panel user: magento

is there a quick way to correct the privileges?

eris - ok…thats impressive! so does that run and install everything? what needs to be preinstalled to run that script?
I see at the end you set up cron job in the panel? I guess that will work the same way, except you can see it as a cron job.

chown shouldn’t be needed just make sure you use the commands as the user…

You still need to setup your server as “required” for Magento with all the software required.
It also checks if the Redis database provided is not in use what could cause performance issues.

And run the script as the root user…

I have also an “magento” package + the following script in the same folder with the same name. (Instead .pkg it is .sh) (Located in /usr/local/hestia/data/packages/)

And it sets up the user correctly.

#/bin/bash

v-add-user-composer "$1"
v-change-user-php-cli "$1" "7.4"

Yes also any updates will not overwrite any thing when needed…

thanks Eris.

Maybe this sounds familiar to someone. After Magento installed, everything appears fine. but after approx 1-2 hrs (not sure exactly how long) the link to magento admin becomes a dead link.
404 Not Found - “The page you requested was not found, …”
The website front end remains fine.

Is there a timer setting that is causing this? No error message. just dead link.

I know Magento changes admin usr to something like: admin_randomstring

How ever I have no idea

Regarding the 404 error on the admin side. It didn’t error right after installing magento. maybe 1-2 hrs later it would start with the 404 error.
Resolved it using this:

From: How to Fix Magento Admin 404 Error After Install - SimiCart

Delete var/cache folder
Go to your Magento 2 database and run the following SQL query:
SELECT * FROM core_config_data WHERE path = ‘web/seo/use_rewrites’ and make it 0 (mine was set to 1)

If this looks like an unwise fix. Please let me know.
thanks

@eris Does this mean we need to restart or reinstall the Magento cron when HestiaCP updates to a new version? After the last HestiaCP update, running crontab -l displayed nothing as the Magento user and the 3 log files in the Magento/var/log directory (cron.log , exception.log , magento.cron.log) didn’t exist.

Just put the cronjob in the “Cron” tab via CLI command

v-add-cron-job $user "*/5" "*" "*" "*" "*" "/usr/bin/php7.4 /home/$user/web/$domain/public_html/bin/magento cron:run"

Or just manually.

It has been done like this in the past as it would allow in case the hell break loose and you need to restore from backup. The cronjob will also in a backup.

1 Like