1

I am currently stuck with a Magento 2.3.1 CE installation on a VPS running on debian9 on LAMP

The installation went without any problems. But when I try to access the admin url I get the URL not found error.

the magento archive has been uploaded and extracted as the magento system user. All following tasks have been also performed as magento (who is member of www-data). The server has a https certificate (via certbot). And I use my own virtual host file, which has been activated.

Maybe the content is wrong:

<VirtualHost *:80>
ServerName xxxx
ServerAlias www.xxxx.xx
ServerAdmin info@xxxx.xx
DocumentRoot /var/www/html/

ErrorLog /home/magento/logs/error.log
CustomLog /home/magento/logs/access.log combined

<Directory /var/www/html/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
</Directory>
</VirtualHost>

the .htaccess file delievered with the magento package has not been touched.

I suppose a problem with my apache2 config, or a permission problem. mod rewrite is enabled.

Any hint is much appreciated.

apache2.4; php7.2.16 @debian9 squeeze + Magento CE 2.3.1


turns out the admin url was not changed at all. I entered a custom url during installation, still the random generated is saved in /app/etc/env.php 'frontName' => 'admin_9h7wss'

but even trying to access this url generates 404

  • Try to add any php file with test message on magento root and access that file. If you are able to access this file, it meas that there is no issue with virtual host – user55548 Apr 9 at 13:23
  • are you sure it's the correct admin url? the frontname for the adminhtml is defined in app/etc/env.php – Philipp Sander Apr 9 at 15:28
  • Thank you for the hint. it is weird the env.php still contains the random generated admin url – Joe F Apr 10 at 19:09
0

I forgot to adjust the apache2 ssl.conf (/etc/apache2/sites-enabled/000-default-le-ssl.conf)

<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html        

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    SSLEngine On
    ServerName xxxx.xx
    SSLCertificateFile /etc/letsencrypt/live/xxxx.xx/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/xxxx.xx/privkey.pem
    Include /etc/letsencrypt/options-ssl-apache.conf
    <Directory /var/www/html>
            Options Indexes FollowSymLinks Multiviews
            AllowOverride All
            ServerSignature off
    </Directory>

Now it works like a charm.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.