Mautic 3 on Centos 7 404 after installer completes

Sure, here content of file.
One point : i keep error also before insert code part for redirect http to htts.

server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 301 https://$host$request_uri;
}

server {
listen 443 ssl;
listen [::]:443 ssl;
include snippets/self-signed.conf;
include snippets/ssl-params.conf;

 server_name mautic3-it;

 root /var/www/mautic;
 index index.php;

 location / {
   try_files $uri $uri/ =404;
 }

 location ~ .php$ {
   include snippets/fastcgi-php.conf;
   fastcgi_pass unix:/run/php/php7.2-fpm.sock;
 }

 location ~* ^/index.php {
   fastcgi_split_path_info ^(.+.php)(/.+)$;
   fastcgi_pass unix:/run/php/php7.2-fpm.sock;
   fastcgi_index index.php;
   fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
   include fastcgi_params;
   fastcgi_buffer_size 128k;
   fastcgi_buffers 256 16k;
   fastcgi_busy_buffers_size 256k;
   fastcgi_temp_file_write_size 256k;
 }

}

Your software
My Mautic version is: 3.0.1
My PHP version is: PHP 7.2.24-0ubuntu0.18.04.6
Server OS: Ubuntu 18.04.4 LTS
Mysql: Ver 14.14 Distrib 5.7.30, for Linux
nginx: nginx/1.14.0 (Ubuntu)

Your problem
My problem is: Seems URL command cannot correctly locate the installer
The command URL changes from domain.com/mautic/ to
domain.com/mautic/index.php/installer with an error 404

These errors are showing in the log: There is no log

Steps I have tried to fix the problem:
1/ i have reviewed other similar error 404 problems and they have not led to solving this particular problem

2/ I assume it is something quite basic in the ngnix config at finding the installer files in the vendor subdir

3/ NOTE: I have a multi-site nginx server with multiple web servers under the main domain.
example: //main domain.com/mautic
//main domain.com/site2
etc…

4/ Suggestion: What may help me (and others with similar configs using nginx) is to post a functional example nginx.conf and perhaps an example site “sites-available/server” file so that this step becomes a mute problem for this and future releases.

5/ nginx.conf file: Perhaps someone may be able to point out the errors in my ways :slight_smile:

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
worker_connections 768;
# multi_accept on;
}
http {

    ##
    # Basic Settings
    ##

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    include /etc/nginx/mime.types;
    default_type application/octet-stream;
    ##
    # SSL Settings
    ##

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;
    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;
    ##
    # Virtual Host Configs
    ##

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;

}

6/ nginx sites-enabled/mautic file
server {
listen 80;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
server_name mautic;
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; allow all; }
location ~* .(css|gif|ico|jpeg|jpg|js|png)$ {
expires max;
log_not_found off;
}

    location / {
            try_files $uri /index.php$is_args$args;
    }
    location /mautic/ {
            try_files $uri $uri/ /mautic/index.php?q=$uri&$args;
    }


    location ~ \.php$ {
            include snippets/fastcgi-php.conf;
            fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
            fastcgi_split_path_info ^(.+.php)(/.+)$;
     }

}

Many Thanks for any input and suggestions on this…

Rgs

@steveoppenheim moved this into an existing topic on 404 errors, please take a look at the thread above!

The thread above unfortunately did’nt really assist for some reason.

I’ve taken the following steps:

1/ installed fresh ubtuntu 18.04, fresh APACHE2, mysql with std configs and installed mautic .zip and "IT WORKS’

2/ installed fresh ubuntu 18.04, fresh nginx, mysql with above and similar server blocks and ALWAYS I get error 404;

It would be great if someone could do this from mautic or from the community with more knowlege about the install structure of mautic and come up with a standard nginx server block structure for 3.0.1

I confirm after doing the fresh install steps 2x for apache and 2x for nginx that someone ‘smarter than I’ needs to come up with a nginx server block structure that allows a fresh install of mautic 3.0.1

Seems to work out of the box for apache2 but Not for Nginx.

@dennisameling
I sent you my nginx cfg, you have idea where is the problem for me ?
Must move my request on other forum section ?
Thank you for help.

Hello, @masterale

I am in the same situation, could you solve your problem?

HI @francourbano,
o forse dovrei dirti ciao !
I solved, but not with mautic staff help.
Try this, if your problem exist now.

If use apache2 : sudo a2dismod 000-default.conf
Someone solve with this : Problem resolved after updating “AllowOverride All” in apache2.conf

I install mautic 3.1.0 many times, before prod server, and take different issue for each installation, so i havnt ant idea why.
Last installation was good, so i take backup for future.
Regards,

Hey there! Sorry for reviving an old thread, but I wanted to thank you for sharing your solutions to the Mautic installation issue. It’s always great to see people helping each other out in forums like these.
On a related note, I noticed that Centos7 has reached the end of its life. If you’re interested in getting extended support, you might want to check out this link I recently discovered: https://tuxcare.com/extended-lifecycle-support/centos-7-extended-support/
Anyway, thanks again for the helpful tips, and I hope you were able to solve your problem with the Mautic installation!