Mautic 3 on Centos 7 404 after installer completes

Your software
My PHP version is : 7.3.19
*My MySQL version is: 5.7.30-1

Installing Errors
I am (delete as applicable): Installing
installing via (delete as applicable) : Command Line

These errors are showing in the installer :

These errors are showing in the Mautic log :

These errors are showing in the upgrade_log.txt file (located in the root of your Mautic instance when an upgrade has been attempted - ensure you remove or redact any sensitive data such as domain names in the file path) :

Your problem
My problem is :
This is a clean install of Centos 7 on a local PC to test Mautic
Mautic files are in apache default site /var/www/html
http write via selinux is only allowed to var, and config as I’m trying to create as secure an instance as possible.

The Installer prerequisites were met and the installer web gui went through as described.

When I browse to the site I get a 404 error
initial url http://lists.nw.local
redirected url http://lists.nw.local/s/dashboard
I believe it should be
http://lists.nw.local/index.php/s/dashboard
If I use that url it shows the login page but after attempting to log in the next page gets a 404 error as index.php is no longer in the url
There are no errors in the apache log

The Mautic log only contains

[2020-06-23 20:35:49] mautic.ERROR: SCHEMA ERROR: An exception occurred while executing ‘SELECT f.alias, f.is_unique_identifer as is_unique, f.type, f.object FROM lead_fields f WHERE f.object = ‘lead’ ORDER BY f.field_order ASC’: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘mauticdb.lead_fields’ doesn’t exist

Steps I have tried to fix the problem :

I’ve tried comparing apache config to setttings posted in howto articles but as I’m not using vhosts the default site settings seem to match, This system will only host Mautic. I haven’t configured https as this is an internal test.

Please advise?

There should not be an index.php in the URL. Are you missing the .htaccess file from the installation perhaps?

Thank you very much for your assistance.

The .htaccess file is there and I assume correct.

The Apache install is default 2.4.6-93 if that helps.

4 posts were split to a new topic: 404 error after installing Mautic 3

What is the site URL in your Mautic configuration (under General Settings)?

It seems like there are some permission/rewrite issues going on @netideas ?

Have a look in app/config/local.php for the site URL, it should not contain /index.php/. Also double check the htaccess against the link above.

This might be helpful for checking permissions: https://docs.mautic.org/en/troubleshooting/file-ownership-and-permissions

Sorry if i reply to this post, but i think is the same problem.

Hi,
i have the same problem on clean installation on Ubuntu 18.04 server made 2 days ago, with nginx and Mysql.
Problem is egual.
When connect to mautic3 website, receive 404 error and return url is : https://192.168.1.95/s/login
So i try to modify this url so : https://192.168.1.95/index.php/s/login and i receive login form.
After user and password and after click on Login button, i take another 404 error
with this return url : https://192.168.1.95/s/login_check.
What’s appen ?
I have downloaded .htaccess from github, but problem wasnt resolved.
Any idea ?

p.s. i have another mautic2 installation and work fine, no problem.

What is the site URL in your local.php file?

In /var/www/mautic/app/config/local.php the site_url parm is : https://192.168.1.95
Ty for help.

In local.php there is ‘site_url’ => ‘http://192.168.20.65’,

Does the site have to be https ?

I still need to compare .htaccess files although I’m using the one that came with Mautic with no modifications. Will also relax file permissions just in case

Thanks

I’ve got the same exact issue on Ubuntu 20.04 running Apache2. Anyone got this figured out?

Same issue here on ubuntu 18

In order to help us troubleshoot further, can everyone please provide us with the following information:

  • What webserver are you using (Apache/Nginx)? If you can, please let us know the webserver version number as well.
    • If Apache, have you set up Mautic as a vhost or under the webserver’s root directory (e.g. http://localhost/mautic)?
  • Are you running Mautic behind a reverse proxy?
  • Are you running Mautic on HTTP or HTTPS?

Thanks in advance!!

Apache package httpd-2.4.6-93.el7.centos.x86_64

Mautic is in webserver root running as http

I just set up a clean CentOS 7 VM with Apache 2.4.6 and PHP 7.3, and can indeed reproduce the issue after the installer completes:

I checked the Apache configuration and by default, AllowOverride is set to None in httpd.conf, which is causing the 404s. This setting was set to None by default starting with Apache 2.3.9.

Setting the AllowOverride setting to All fixed the issue for me :rocket:
Don’t forget to run sudo systemctl restart httpd after changing the config file!

<Directory "/var/www/html">
    # ... Other config here ...

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride All

    # ... Other config here ...
</Directory>

Please let us know if this helps!

3 Likes

Hi,
had the same error on Debian9, and I found I too had “AllowOverride None” in the apache directive, probably a copy&paste from a different site configuration.

By setting “AllowOverride All” I solved the 404 as well.

1 Like

Thanks for your time and effort to investigate this.
That solved the issue.
Very much appreciated.

1 Like

Problem solved. Thanks mate. :+1:

1 Like

Information requested :

  • What webserver are you using (Apache/Nginx)? If you can, please let us know the webserver version number as well.
    nginx version: nginx/1.14.0 (Ubuntu 18.04 server)

    • If Apache, have you set up Mautic as a vhost or under the webserver’s root directory (e.g. http://localhost/mautic)?
      using nginx
  • Are you running Mautic behind a reverse proxy?
    NO. And i have already a mautic 2 running server from 2 month

  • Are you running Mautic on HTTP or HTTPS?
    Https If want can show you nginx webserver config

Thank you a lot, for help.

@masterale Can you please share you Nginx config? Mautic works best with Apache out of the box, but if you share your config here we can have a look :slight_smile: