Magento installation error.

Discussion in 'Installation/Configuration' started by Kartik Sadhukhan, Dec 31, 2021.

  1. Kartik Sadhukhan

    Kartik Sadhukhan New Member

    I have created one website and I want to install Magento 2 site but when I try to do anything in the website document root directory then it is showing that "operation is not permitted". Whereas I am using ssh shell user for that location.
    Required someone's assistance.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Which exact directory are you using? The website directory is /var/www/yourdomain.tld/web/ and this directory is accessible by the shell user of your site, the ftp user of your site and also by the php process of that website (choose php mode php-fpm and enable suexec checkbox). Other directories outside of the 'web' folder are not writeable, except private folder.
     
  3. Kartik Sadhukhan

    Kartik Sadhukhan New Member

    I am using /var/www/clients/client1/web2/web directory. Basically, I am trying to create a composer project for Magento 2 inside this folder.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Take care that you are logged in with a shell user of the website. Then go to the web directory using command, there you try to run:

    touch test.txt

    if you don't get an error that the file could not be created, then this means that there are no issues writing to that folder.
     
  5. Kartik Sadhukhan

    Kartik Sadhukhan New Member

    Is any tutorial or guidance available for magento installation in ISPconfig?
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    '
    Seems there are, and Internet Search Engines with
    Code:
    magento installation in ISPconfig?
    finds them.
     
  7. Kartik Sadhukhan

    Kartik Sadhukhan New Member

    Hi Till & Taleman,
    Thanks again for your response, After reading blogs I understand that Magento web installer option is no longer supported in latest version of magento.(https://community.magento.com/t5/Installing-Magento-2-x/Agree-and-setup-magento-button-missing/td-p/456277)
    But I tried installing magento using composer and elastic search. I have created one composer project under document root folder but after creating the project and installing the magento. I followed this guide >> (https://devdocs.magento.com/guides/v2.4/install-gde/composer.html)
    When I tried to access the site then I am getting error "404 No url found". I tried to copy .htaccess file content and put the content in Apache directives as Till mentioned in a previous post (https://www.howtoforge.com/community/threads/magento-with-the-config-of-ispconfig-it-is-possible.19412/) but did not work.
    Please help.
     
    Last edited: Jan 10, 2022
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  9. Kartik Sadhukhan

    Kartik Sadhukhan New Member

    Hi Taleman,
    I did #4 as Till mentioned. I am able to login using shell user and also I am able to do everything inside web directory.
    Hereby I attached the report as you suggested.

    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Ubuntu 20.04.3 LTS
    
    [INFO] uptime:  16:11:19 up  3:01,  1 user,  load average: 0.40, 0.11, 0.03
    
    [INFO] memory:
                  total        used        free      shared  buff/cache   available
    Mem:          3.8Gi       2.8Gi       136Mi        18Mi       867Mi       735Mi
    Swap:         3.8Gi       1.4Gi       2.4Gi
    
    [INFO] systemd failed services status:
      UNIT                      LOAD   ACTIVE SUB    DESCRIPTION
    ● fwupd-refresh.service     loaded failed failed Refresh fwupd metadata and update motd
    ● snap.lxd.activate.service loaded failed failed Service for snap application lxd.activate
    
    LOAD   = Reflects whether the unit definition was properly loaded.
    ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
    SUB    = The low-level unit activation state, values depend on unit type.
    
    2 loaded units listed.
    
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.2.7p1
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 7.4.27
    [INFO] php-cgi (used for cgi php in default vhost!) is version 7.4.27
    
    ##### PORT CHECK #####
    
    
    ##### MAIL SERVER CHECK #####
    
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
            Apache 2 (PID 4790)
    [INFO] I found the following mail server(s):
            Postfix (PID 2046)
    [INFO] I found the following pop3 server(s):
            Dovecot (PID 638)
    [INFO] I found the following imap server(s):
            Dovecot (PID 638)
    [INFO] I found the following ftp server(s):
            PureFTP (PID 1682)
    
    ##### LISTENING PORTS #####
    (only           ()
    Local           (Address)
    ***.***.***.***:53              (652/named)
    [anywhere]:21           (1682/pure-ftpd)
    [localhost]:53          (652/named)
    ***.***.***.***:53              (624/systemd-resolve)
    [anywhere]:22           (746/sshd:)
    [anywhere]:25           (2046/master)
    [localhost]:953         (652/named)
    [anywhere]:4190         (638/dovecot)
    [anywhere]:993          (638/dovecot)
    [anywhere]:995          (638/dovecot)
    [localhost]:11332               (690/rspamd:)
    [localhost]:11333               (690/rspamd:)
    [localhost]:11334               (690/rspamd:)
    [localhost]:10023               (1380/postgrey)
    [localhost]:3306                (972/mysqld)
    [anywhere]:587          (2046/master)
    [localhost]:6379                (977/redis-server)
    [localhost]:11211               (650/memcached)
    [anywhere]:110          (638/dovecot)
    [anywhere]:143          (638/dovecot)
    [anywhere]:465          (2046/master)
    [localhost]:9300                (640/java)
    *:*:*:*::*:9300         (640/java)
    *:*:*:*::*:21           (1682/pure-ftpd)
    *:*:*:*::**:*:*:*::*53          (652/named)
    *:*:*:*::*:53           (652/named)
    *:*:*:*::*:22           (746/sshd:)
    *:*:*:*::*:25           (2046/master)
    *:*:*:*::*:953          (652/named)
    *:*:*:*::*:443          (4790/apache2)
    *:*:*:*::*:4190         (638/dovecot)
    *:*:*:*::*:993          (638/dovecot)
    *:*:*:*::*:995          (638/dovecot)
    *:*:*:*::*:587          (2046/master)
    *:*:*:*::*:6379         (977/redis-server)
    [localhost]10           (638/dovecot)
    [localhost]43           (638/dovecot)
    *:*:*:*::*:8080         (4790/apache2)
    *:*:*:*::*:80           (4790/apache2)
    [localhost]:9200                (640/java)
    *:*:*:*::*:9200         (640/java)
    *:*:*:*::*:8081         (4790/apache2)
    *:*:*:*::*:465          (2046/master)
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    
    
    
    
    ##### LET'S ENCRYPT #####
     
    Last edited: Jan 10, 2022
  10. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You forgot to paste in CODE tags.
    There are two failed services. Snap failing might be related to your errors. I do not know what Ubuntu runs in snaps.
    Other than those, read apache logs for the website and the /var/log/apache2 directory for more informative error messages.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Please go to the 'web' directory of the site and run the command 'ls -la' and post the output, so we can see what is installed there.
     
  12. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    did you run all of those commands for the composer install instructions?
    in the file permissions section, you do not want to run:
    for the actual magento config part, what did you set as the base url?
     
  13. Kartik Sadhukhan

    Kartik Sadhukhan New Member

    Hi,
    I have taken screenshot and posting here.
    Basically I have installed magento inside web/magento folder.
    Changed document root in Apache directives
    Now giving this error while accessing.

    Also getting an error while accessing admin url.
     

    Attached Files:

    Last edited: Jan 13, 2022 at 11:03 AM
  14. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    my first suggestion would be to remove the docroot change, that may cause issues with magento's base url.
    then try browsing to test.bphcl.com or test.bphcl.com/magento and see what you get
     
  15. Kartik Sadhukhan

    Kartik Sadhukhan New Member

    I tried your solution but no luck.Removed path of document root from apache directive.

    upload_2022-1-13_15-45-27.jpeg


    upload_2022-1-13_15-45-16.jpeg
     

    Attached Files:

  16. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    try test.bphcl.com/magento/pub/

    what files are in the /web folder?
    currently i'm not seeing anything pointing to a php file., is there an index.php in /web, if not, whats in the .htaccess files in /web and /web/magento ?
     
  17. Kartik Sadhukhan

    Kartik Sadhukhan New Member

    Inside web folder-
    Code:
    [email protected]:/var/www/test.bphcl.com/web$ ls -la
    total 20
    drwx--x--x  5 web7 client1 4096 Jan 13 09:40 .
    drwxr-xr-x 11 web7 client1 4096 Jan 13 09:17 ..
    drwxr-xr-x  2 root root    4096 Jan 13 09:40 error
    drwxr-xr-x 12 web7 client1 4096 Jan 13 09:29 magento
    drwxr-xr-x  2 root root    4096 Jan 13 10:10 stats
    Inside magento folder -
    Code:
    [email protected]:/var/www/test.bphcl.com/web/magento$ ls -la
    total 1928
    drwxr-xr-x 12 web7 client1    4096 Jan 13 09:29 .
    drwx--x--x  5 web7 client1    4096 Jan 13 09:40 ..
    drwxr-xr-x  4 web7 client1    4096 Jan 13 09:29 app
    -rw-r--r--  1 web7 client1     150 Jan 13 09:29 auth.json.sample
    drwxr-xr-x  2 web7 client1    4096 Jan 13 09:29 bin
    -rw-r--r--  1 web7 client1  766543 Jan 13 09:29 CHANGELOG.md
    -rw-r--r--  1 web7 client1    3057 Jan 13 09:28 composer.json
    -rw-r--r--  1 web7 client1 1058895 Jan 13 09:27 composer.lock
    -rw-r--r--  1 web7 client1     650 Jan 13 09:29 COPYING.txt
    drwxr-xr-x  4 web7 client1    4096 Jan 13 09:29 dev
    -rw-r--r--  1 web7 client1     343 Jan 13 09:29 .editorconfig
    drwxrwsr-x  3 web7 client1    4096 Jan 13 10:33 generated
    -rw-r--r--  1 web7 client1    1531 Jan 13 09:29 .gitignore
    -rw-r--r--  1 web7 client1      55 Jan 13 09:29 grunt-config.json.sample
    -rw-r--r--  1 web7 client1    2994 Jan 13 09:29 Gruntfile.js.sample
    -rw-r--r--  1 web7 client1     214 Jan 13 09:29 .htaccess
    -rw-r--r--  1 web7 client1   11382 Jan 13 09:29 .htaccess.sample
    drwxr-xr-x  4 web7 client1    4096 Jan 13 09:29 lib
    -rw-r--r--  1 web7 client1   10376 Jan 13 09:29 LICENSE_AFL.txt
    -rw-r--r--  1 web7 client1   10364 Jan 13 09:29 LICENSE.txt
    -rw-r--r--  1 web7 client1    6945 Jan 13 09:29 nginx.conf.sample
    -rw-r--r--  1 web7 client1    1275 Jan 13 09:29 package.json.sample
    -rw-r--r--  1 web7 client1    1519 Jan 13 09:29 .php_cs.dist
    drwxr-xr-x  2 web7 client1    4096 Jan 13 09:29 phpserver
    drwxr-xr-x  6 web7 client1    4096 Jan 13 09:29 pub
    -rw-r--r--  1 web7 client1     700 Jan 13 09:29 SECURITY.md
    drwxr-xr-x  7 web7 client1    4096 Jan 13 09:29 setup
    -rw-r--r--  1 web7 client1     101 Jan 13 09:29 .user.ini
    drwxrwsr-x  7 web7 client1    4096 Jan 13 10:33 var
    drwxrwsr-x 85 web7 client1    4096 Jan 13 09:29 vendor
    Content of .htaccess -
    Code:
    [email protected]:/var/www/test.bphcl.com/web/magento$ cat .htaccess
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !^/pub/
    RewriteCond %{REQUEST_URI} !^/setup/
    RewriteCond %{REQUEST_URI} !^/update/
    RewriteCond %{REQUEST_URI} !^/dev/
    RewriteRule .* /pub/$0 [L]
    DirectoryIndex index.php
    Getting error when using test.bphcl.com/magento/pub/
    Code:
    This page isn’t workingtest.bphcl.com is currently unable to handle this request.
    HTTP ERROR 500
     

Share This Page