I am facing the problem of having two entry points to Magento2 index.php and pub/index.php.

I want to add another DIR called "pub", add this to the document root load and test it.

Currently it is:


But I want to set it to:


What are the correct steps to point apache to the correct entry point and load the necessary files?


If you use only one you can set in the "httpd.conf" the Documentroot must be at row: 183 Path to the httpd.conf is:


change to: DocumentRoot C:\xampp\htdocs\magento2\pub After change restart the apache.

| improve this answer | |
  • That works. Do I need to copy any files from: C:\xampp\htdocs\magento2\ to C:\xampp\htdocs\magento2\pub\. My storefronts are not the same. – Deadulus Nov 7 '17 at 17:22
  • Yes you must copy all Files in the root folder in you case magento2/pub – Marcel Nov 7 '17 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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