-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Unable to run Web Setup on nginx #2504
Comments
@iget-esoares I believe this is an nginx/php-fpm issue. Please see this thread for a possible solution: http://stackoverflow.com/questions/23390531/access-denied-403-for-php-files-with-nginx-php-fpm?answertab=active#tab-top |
Closing this issue, since it is not magento related. |
Yes, it is an magento related problem! I have many applications running on this machine, from Laravel to Zend applications, and this problem does not occours. Magento 2 suggests an default nginx conf file that does not work! |
Trying to follow the error. When I try to access
Following the stack, I found this method: The method
Note that this is producing wrong setup directory and root directory! |
Solved: Changed
|
this is not required, related only to your environment. |
Thanks @iget-esoares. I had the same problem with nginx. |
Thanks from me too @iget-esoares. Wonder why so common problem posted only here. Lost 2 days to found fix for it. @mazhalai we need your attention, it's a BUG |
@deenoize if it was a bug then 95% installations would fail... while it's only few of them, which tells me that you have to check your php cgi.fix_pathinfo variable. or even check your specific setup... |
The fix for me was to update cgi.fix_pathinfo to 1 inside of my php.ini file. |
@magenx sure thing, but I saw a lot of people out there who face a problem just like me. It will be nice if you add commented cgi.fix_pathinfo variable and description to nginx.conf.sample for such situations |
I have a fairly basic Nginx + PHP-FPM setup, and adding this one |
I found simple solution from here: |
Had the same problem here, @iget-esoares solution fixed it for me. Setting cgi.fix_pathinfo = 0 is a common step in HowToForge guides, especially using ISPConfig. |
This seems to be a php7 issue. We tested on php5 - no problem to install. With this fix it worked. |
iget-esoares solutions works under PHP7.0-fpm. Thanks! |
@iget-esoares solution works. Awesome man! |
Can you pls consider to reopen this and also include it in next release as this is magento related! |
I downloaded the lastest version 2.1, and suffer this problem. first, thanks @iget-esoares it solved my problem |
I also had this issue. I resolved the issue by removing the content of server{} section of the default nginx.conf file, and replaced it with the suggestion in magento/nginx.conf.sample. Obviously I corrected paths, as opposed to blindly copying/pasting, so all paths are valid/correct. |
Almost ONE YEAR after creating this issue, I've decided to try Magento 2 again, and I stuck on the same error, in another totally different machine (Ubuntu 16 instead of 14, brand new setup). Again, the only fix I've found was my own fix. Imagine many new people that want to try Magento 2, and stuck into this error? Not everyone has the know legend to fix this, or seek on github issues. |
@iget-esoares totally agree. Do you use php7? We found it to work without the fix on php5 but php7 need the fix. |
this thread just shows how many people dont know the difference between the real bug and specific environmental configuration. |
I am using php7.0-fpm, and nginx running on Ubuntu 16.04. @iget-esoares's solution worked flawlessly. I have been searching for a solution to my problem for 2 days now. Thank you. I do believe that this configuration change, while not actually a bug. Does deserve, at very least, a mention in the comments of the sample nginx configuration file. |
Same problem, same fix. Thanks @iget-esoares. |
The solution of @iget-esoares has fixed the issue for me also. |
Same, thanks @iget-esoares. |
Hi @iget-esoares , Can you please help me to solve the same problem.? I'm trying the magento 2 with nginx in my local environment. I'm getting same problem when trying to call my project htttp://radianstore/setup its not loading /navigation ,/side-menu etc throwing 404. But all css and js files are loading. I have tried the fix you suggested in my /var/www/html/radianstore/nginx.conf.sample ===================
=============================================== My project hosts conf in /etc/nginx/sites-available/ =====================================================
======================================================== Regards, |
@iget-esoares worked for me like charm. |
@magenx otherwise it's not really opensource. And only supporting old php versions is just irresponsible in therms of security almost aiding and abetting. |
i have this problem with apache server and php5.6;
does not work. In the chrome debugger network tab, i can see that an ajax request is not returning and executed again and again: it happens in angular.js:7715 Edit: |
Thanks for the solution @iget-esoares Magento folk, I think it's pretty clear that this is a frequent enough problem that it's something you ought to support. |
@iget-esoares nice solution! Same problem. |
Thanks for the solution @iget-esoares! |
@daveyx solution worked for me! composer.json had 2 repos. |
@jsthomas79 you're welcome |
Hello, I stil have this issue after all this time. I managed to solve it with |
One solution that worked was (linux ubuntu operating system with apache2 server): Access the folder Open file as administrator Include the following code before finishing the tag Execute the following commands
|
magento 2.2.1, php-fpm 7, nginx. Same problem... Only @iget-esoares's solution helps. |
The same problem for magento 2.2.2 (with sample data). On my ubuntu 16.04 machine with nginx and php7.0-fpm setup.
|
Experiencing the same problem. The fix provided by @iget-esoares is legit and should be merged into the main configuration sample that is provided by Magento. |
Hello @iget-esoares I have setup server with nginx , php 7.1.19, mysql for magento 2 environment. I am tyring to setup magento site even trying to install simple magento 2.2.5 showing error in google dve chrome console GET http://206.189.221.91/setup/index.php/navigation 404 (Not Found) I have setup my magento.conf file on /etc/nginx/sites-available/magento upstream fastcgi_backend {
} My magento root folder nginx.conf.sample file code set $MAGE_ROOT /var/www/html; index index.php; location ~* ^/setup($|/) {
} location ~* ^/update($|/) {
} location / { location /pub/ { location /static/ {
} location /media/ {
} location /media/customer/ { location /media/downloadable/ { location /media/import/ { location ~ (index|get|static|report|404|503|health_check).php$ {
} gzip on; gzip_comp_level 6; location ~* (.php$|.htaccess$|.git) { If any one can help me i would much appreciated. |
@webcretatechnologies Have you checked your php.ini file? in case you're using php 7.1.x in linux, it should be in /etc/php/7.1/fpm/php.ini. What is 'cgi.fix_pathinfo' value? You can try to modify the value to 1 like my solution above. |
This comment was marked as abuse.
This comment was marked as abuse.
The solution provided by @iget-esoares didn't work for me, maybe because I'm running this on Vagrant/Homestead box, but what really worked for me was this: Insert this directive after this That fixed the problem for me. |
@iget-esoares thx a lot for that line, it was really tricky to fix this error. |
@Dannymx thank you. Magento 2.3.1 and Vagrant/Homestead |
Worked in Ubuntu 18.04/PHP 7.2/nginx 1.14 |
5 years later, Magento version 2.3.4 and this issue still persists. |
@Dannymx Thank You! It worked for Vagrant/Homestead Magento 2.3. |
I have the same problem.. but this solutions was not worked for me =/ |
Hi,
I've downloaded my magento 2 copy using composer, and set up a nginx website using this config:
When I try to run "http://magento/setuo" it loads an empty view.
Oppening the Chrome Dev. Console, it shows me:
I'm realy getting crazy about this. I'm using recomended nginx setup and config file...
My server has permission to access files, and all files have proper chmod
Also my nginx log this:
The text was updated successfully, but these errors were encountered: