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.

4
  • Are you using apache ? It will took max 10 min to create virtual host! Also You can create Single virtual host and run multiple magento inside main host folder!
    – Pawan
    Commented Aug 13, 2021 at 4:32
  • Refer :rohanhapani.com/… Commented Aug 13, 2021 at 4:34
  • @Pawan but I don't want to make virtualhost Commented Aug 13, 2021 at 4:51
  • @RohanHapani I won't solution without creating a virtual host Commented Aug 13, 2021 at 4:54

3 Answers 3

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.

1
  • I am currently using a Linux system so I don't want to use docker. Commented Aug 13, 2021 at 6:52
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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.