-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Create symlink to setup wizard con compile command to avoid 404 error when /pub directory is configured as root path #16151
Conversation
There are some issues related to the 404 error when entering on setup wizard page when /pub directory is configured as root path in apache or nginx. With this fix, the compile command will create a symlink to setup. Related: https://github.com/magento/magento2/search?q=wizard+404&unscoped_q=wizard+404&type=Issues
Hi @fcjurado. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
@fcjurado I'm using the same setup without any issues. Could you provide more details on how to reproduce this issue? |
@orlangur do you have the apache settings configured as documentRoot on /pub folder? When it is configured, any setup link, file or url does not exist on this directory. So my solution is to create a setup link. Another solution could be using rewrite rules |
Fix Codacy PR Quality review
Fix file_exists return on checking setupPublicPath
@fcjurado I'm using Valet Plus and it is using Are you sure nginx setup is affected? |
@orlangur it only affects to Apache environments. I'd researched for an universal solution but only this is the only solution I found to prevent this 404 or access denied to Web Setup Wizard. However, I've read again the documentation on https://devdocs.magento.com/guides/v2.2/install-gde/tutorials/change-docroot-to-pub.html, and noticed that the 4.2 point says that throwing a 404/403. I missunderstand it, so when configuring "pub" as root folder, no one could access to Web Setup Wizard? |
@fcjurado yep, thanks for investigation
So there is nothing to fix here. More than that, what could be fixed on server configuration level, should be fixed on this level instead of adding some symlinking logic. |
Description
There are some issues related to the 404 error when entering on setup wizard page when /pub directory is configured as root path in apache or nginx.
With this fix, the compile command will create a symlink to setup.
Related: https://github.com/magento/magento2/search?q=wizard+404&unscoped_q=wizard+404&type=Issues
Fixed Issues (if relevant)
Manual testing scenarios
Contribution checklist