0

I've setup WSL(Windows Subsystem for Linux) on my machine for development purpose with following stack.

Ubuntu : 18.04
PHP Version : 7.2
nginx : 1.14.0
mysql : 5.7

I've already installed all required prerequisites/PH Extensions of Magento 2.3.x

now I'm going to install Magento 2.3.2 but Magento not working properly.

I've extracted .tar file and execute following commands

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
find ./var -type d -exec chmod 777 {} \;  
find ./pub/media -type d -exec chmod 777 {} \;
find ./pub/static -type d -exec chmod 777 {} \;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
chown -R :www-data .
chmod u+x bin/magento

while installing Magento setup page not rendering properly. Wordpress and CI works fine on the server it mean there is not the server configuration issue.

I'm not sure but i think there is no file permission issue, I'd installed magento 2.3.x so many times with Apache, this this is the first time I'm installing it with nginx

the output of magento setup page isn't completely blank kindly please visit URL

Output: https://snipboard.io/CfRilJ.jpg
Sourcecode: https://snipboard.io/vicz3S.jpg
6
  • what do you see in network & javascript tab while reloading the setup page? Commented Aug 25, 2019 at 12:37
  • kindly please check these screenshots 1. snipboard.io/0HR7an.jpg 2. snipboard.io/j8fe5m.jpg
    – jkdobariya
    Commented Aug 25, 2019 at 18:32
  • It seems like you have misconfigured your webserver. Do you use Apache or Nginx? Commented Aug 25, 2019 at 18:37
  • this is first time i'm using nginx so may be you are right but i've no idea how to solve.
    – jkdobariya
    Commented Aug 25, 2019 at 18:39
  • It's better to create a separate virtual host for your instance. I will help you configuring this in answer. Commented Aug 25, 2019 at 18:44

1 Answer 1

1

Because you use WLS (Ubuntu 18.04), I suppose that you know how to do these inside WSL terminal (bash).

Create a file with path /etc/nginx/sites-available/magento2 to create a new virtualhost configuration.

$ sudo touch `/etc/nginx/sites-available/magento2`

Edit /etc/nginx/sites-available/magento2 to match your Magento 2 configuration. For example, configuring the Magento 2 root path.

upstream fastcgi_backend {
   server   unix:/var/run/php/php7.2-fpm.sock;
}
server {
   listen 80;
   server_name magento2.local; # this is a domain name for your Magento 2 instance, change this to match your need
   set $MAGE_ROOT /var/www/magento; # this is your Magento 2 root path, change this to match your need
   include /var/www/magento2/nginx.conf.sample; # the nginx.conf.sample is located in your Magento 2 root directory, change the path to where your Magento 2 root directory is located
}

Create a symlink of that file to Nginx's sites-enable directory to enable that virtualhost.

$ sudo ln -s /etc/nginx/sites-available/magento2 /etc/nginx/sites-enabled

Add this line inside /etc/hosts.

127.0.0.1 magento2.local # you should change the domain name if you change the domain name part in Nginx configuration created before

Restart Nginx

$ sudo service nginx restart

Open your Magento 2 setup again, it should work now.

2
  • I've followed your instruction but getting same problem but this time 403 instead of 404 in network. and angular issue is remain same in console kindly please check snipboard.io/bnpYgH.jpg
    – jkdobariya
    Commented Aug 25, 2019 at 22:30
  • do you put the right paths (both of $MAGE_ROOT and include) inside server {}? Commented Aug 26, 2019 at 5:10

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.