Skip to content

Consistant Location for index.php File #356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
astorm opened this issue Sep 7, 2013 · 8 comments
Closed

Consistant Location for index.php File #356

astorm opened this issue Sep 7, 2013 · 8 comments
Labels
improvement Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@astorm
Copy link

astorm commented Sep 7, 2013

As it stands, Magento 2 currently ships with two index.php bootstrap files. One in the root folder

index.php

and one in the pub folder

pub/index.php

This situation creates some uncertainty for end users of the system as to which folder should be exposed to their web-server. The includes of a pub folder will indicated to some developers that this should be the public webroot. However, developers not familiar with the concept will see index.php in the root folder and assume this file should be exposed.

With commenting on which approach is better, a single approach should be chosen for the file to reduce confusion in the system. A single location for the "index bootstrap" files should be chosen, and stuck to. (assuming, of course, there's is not an opaque-but-important reason for the current state of affairs)

@philwinkle
Copy link
Contributor

👍 I agree with Alan. The inclusion of /pub was obvious to me but would likely be nonobvious for many.

@tanya-soroka tanya-soroka self-assigned this Feb 18, 2014
@antonmakarenko
Copy link

@astorm @philwinkle

Both index.php are entry points and they are reusing the same app/bootstrap.php

The intended use cases:

  • The root index.php -- for those who deploy the entire Magento code base into a web-accessible location. For example, into the "document root" or a subdirectory under document root. This use case is inherited from Magento 1 and it is typical for a shared hosting environment
  • The pub/index.php -- if you are able to configure the "pub" directory as the document root. In order to run a Magento 2 web application, the "pub" directory is the only one that's necessary to expose. The rest you can hide (typically for security reasons, to avoid accidental exposing local.xml or something like that).

@ihor-sviziev
Copy link
Contributor

I think Magento 2 should has one index.php in pub directory. It's more secure.

@maksek maksek added the PS label Nov 12, 2014
@verklov verklov added the TECH label Jan 13, 2015
@vpelipenko
Copy link
Contributor

Internal ticket: MAGETWO-32660

@vpelipenko vpelipenko added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Feb 23, 2015
magento-team pushed a commit that referenced this issue Jun 19, 2015
[NORD] MAGETWO-34125 Sample Data fix
@tanya-soroka tanya-soroka removed their assignment Sep 10, 2015
@amenk
Copy link
Contributor

amenk commented Sep 25, 2015

What is the status of the internal ticket?

@amenk
Copy link
Contributor

amenk commented Sep 25, 2015

See also #1874

@astorm
Copy link
Author

astorm commented Aug 23, 2016

No update since September of last year -- assuming this isn't a priority for the engineering team and closing out.

@astorm astorm closed this as completed Aug 23, 2016
@piotrekkaminski
Copy link
Contributor

Hey @astorm. I do understand the confusion it introduces and while we have plans to have single entry point, it is not a priority due to low impact and possibility of affecting many merchants using lower end hosting providers, who still (s)FTP the files and cannot change the webroot. Ideally everyone that can should be using pub as the entry point and I will ask to clarify this in the guides.

okorshenko pushed a commit that referenced this issue Dec 14, 2016
Fixed issues:
- MAGETWO-56910: Braintree doesn't work when using table prefixing
- MAGETWO-57426: [Github] Braintree Vault payments causing GET order API to throw error
- MAGETWO-56932: Checkout page freezes when ordering Virtual Gift Card with Authorize.net set to Authorize and Capture
- MAGETWO-57037: UPS not providing shipping rates for Puerto Rico
- MAGETWO-57086: [Github] #5910 Braintree sandbox errors when using alternative Merchant Account ID
magento-engcom-team added a commit that referenced this issue Feb 21, 2019
 - Merge Pull Request magento/graphql-ce#356 from magento/graphql-ce:GraphQL-352-is-email-available
 - Merged commits:
   1. 0654c32
   2. 6293ca7
   3. a29ecf4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests