1

I install Magento 2.4.2 but I have got 404 page not found, please give any suggestions for run M2.4.2 without a virtual host because I want to work on multiple Magento at a time so the virtual host is not suitable for me.

Rutvik Monpara
  • 326
  • 2
  • 10

3 Answers3

1

Yes, you can run Magento without virtual host. for this follow these steps

  1. keep your magento root directory inside /var/www/html like this /var/www/html/your_magento_directory
  2. then inside core_config_data define your url as localhost/your_magento_directory/pub OR 127.0.0.1/your_magento_directory/pub
  3. then go to your browser and write same path like http://localhost/your_magento_directory/pub

Now check your Magento is running successfully.

Note: in older versions of Magento you don't need to hit pub folder just give path till Magento root directory and you Magento will be working fine. because in older version index.php file is in root directory and in later versions index.php file is inside pub folder.

0

Try https://github.com/davidalger/warden. You run Magento as a docker instance.

Petar Borisovski
  • 708
  • 6
  • 18
0

You can try this suggestion and install magento instances installed in subfolders. This solution suggestion refers to usage of Apache webserver, I am not sure if it will fit your purpose (if you use nginx, for example).

Diana
  • 5,137
  • 1
  • 11
  • 26