# Mautic 3 on Centos 7 404 after installer completes

**URL:** <https://forum.mautic.org/t/mautic-3-on-centos-7-404-after-installer-completes/14961>\
**Category:** Mautic 3 - Install/Upgrade Support\
**Created:** [June 26, 2020, 2:44am UTC](https://forum.mautic.org/t/mautic-3-on-centos-7-404-after-installer-completes/14961 "2020-06-26T02:44:11Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![masterale](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/masterale/32/433_2.png) [@masterale](https://forum.mautic.org/u/masterale)\
**Post date:** [July 3, 2020, 2:47pm UTC](https://forum.mautic.org/t/mautic-3-on-centos-7-404-after-installer-completes/14961/25 "2020-07-03T14:47:23Z")

</div>

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;
 }

```

}

---

<div class="post-metadata">

**Author:** ![steveoppenheim](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/steveoppenheim/32/690_2.png) [@steveoppenheim](https://forum.mautic.org/u/steveoppenheim)\
**Post date:** [July 5, 2020, 8:20am UTC](https://forum.mautic.org/t/mautic-3-on-centos-7-404-after-installer-completes/14961/26 "2020-07-05T08:20:46Z")

</div>

**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/](http://domain.com/mautic/) to  
[domain.com/mautic/index.php/installer](http://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](http://domain.com/mautic)  
//main [domain.com/site2](http://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 🙂

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

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [July 5, 2020, 12:55pm UTC](https://forum.mautic.org/t/mautic-3-on-centos-7-404-after-installer-completes/14961/27 "2020-07-05T12:55:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![steveoppenheim](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/steveoppenheim/32/690_2.png) [@steveoppenheim](https://forum.mautic.org/u/steveoppenheim)\
**Post date:** [July 6, 2020, 8:27pm UTC](https://forum.mautic.org/t/mautic-3-on-centos-7-404-after-installer-completes/14961/28 "2020-07-06T20:27:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![steveoppenheim](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/steveoppenheim/32/690_2.png) [@steveoppenheim](https://forum.mautic.org/u/steveoppenheim)\
**Post date:** [July 6, 2020, 9:51pm UTC](https://forum.mautic.org/t/mautic-3-on-centos-7-404-after-installer-completes/14961/29 "2020-07-06T21:51:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![masterale](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/masterale/32/433_2.png) [@masterale](https://forum.mautic.org/u/masterale)\
**Post date:** [July 8, 2020, 11:05am UTC](https://forum.mautic.org/t/mautic-3-on-centos-7-404-after-installer-completes/14961/30 "2020-07-08T11:05:54Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![francourbano](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/francourbano/32/556_2.png) [@francourbano](https://forum.mautic.org/u/francourbano)\
**Post date:** [December 20, 2020, 8:49pm UTC](https://forum.mautic.org/t/mautic-3-on-centos-7-404-after-installer-completes/14961/31 "2020-12-20T20:49:35Z")

</div>

Hello, @masterale

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

---

<div class="post-metadata">

**Author:** ![masterale](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/masterale/32/433_2.png) [@masterale](https://forum.mautic.org/u/masterale)\
**Post date:** [December 21, 2020, 4:38pm UTC](https://forum.mautic.org/t/mautic-3-on-centos-7-404-after-installer-completes/14961/32 "2020-12-21T16:38:11Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![ratmirbos](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ratmirbos/32/9619_2.png) [@ratmirbos](https://forum.mautic.org/u/ratmirbos)\
**Post date:** [April 13, 2023, 8:14am UTC](https://forum.mautic.org/t/mautic-3-on-centos-7-404-after-installer-completes/14961/37 "2023-04-13T08:14:55Z")

</div>

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/](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!

[Previous page](https://forum.mautic.org/t/mautic-3-on-centos-7-404-after-installer-completes/14961.md?page=1)
