Running on VM and installed successfully but can't access after install

The redirect is normal, you're redirected to guest/index because you are not logged in.
Have a look in the web server logs, the answer should be there.
 
2016/07/11 15:05:02 [error] [exception.CHttpException.404] CHttpException: Unable to resolve the request "customer/index.php". in /home/vagrant/Code/mailwizz/apps/common/framework/yiilite.php:1772
Stack trace:
#0 /home/vagrant/Code/mailwizz/apps/common/framework/yiilite.php(1688): CWebApplication->runController('customer/index....')
#1 /home/vagrant/Code/mailwizz/apps/common/framework/yiilite.php(1205): CWebApplication->processRequest()
#2 /home/vagrant/Code/mailwizz/apps/init.php(224): CApplication->run()
#3 /home/vagrant/Code/mailwizz/index.php(18): require_once('/home/vagrant/C...')
#4 {main}
REQUEST_URI=/customer/index.php/
---
 
So a little information on this I have it pointing the site to /home/vagrant/Code/mailwizz is that correct or does it need to point somewhere deeper like with laravel /sandbox/public?
 
2016/07/11 15:05:02 [error] [exception.CHttpException.404] CHttpException: Unable to resolve the request "customer/index.php". in /home/vagrant/Code/mailwizz/apps/common/framework/yiilite.php:1772
Stack trace:
#0 /home/vagrant/Code/mailwizz/apps/common/framework/yiilite.php(1688): CWebApplication->runController('customer/index....')
#1 /home/vagrant/Code/mailwizz/apps/common/framework/yiilite.php(1205): CWebApplication->processRequest()
#2 /home/vagrant/Code/mailwizz/apps/init.php(224): CApplication->run()
#3 /home/vagrant/Code/mailwizz/index.php(18): require_once('/home/vagrant/C...')
#4 {main}
REQUEST_URI=/customer/index.php/
Looking at above i see it says:
Unable to resolve the request "customer/index.php".
While the end error says:
#4 {main}
REQUEST_URI=/customer/index.php/
If you notice, the end error has a trailing slash. Somehow i think this is the reason why you get the issue. You access customer/index.php and your server translates it to customer/index.php/ which causes the issue i believe.
I am sure this is a web server issues. But i am not sure what exactly.
 
Just a update the server runs nginx and the config file needs to be edited

Found the required lines here:

https://gist.github.com/joglomedia/ba881422b2dc8d482e2d#file-mailwizz-dev-conf-L44


Had to add the below
Code:
    if (!-e $request_filename){
    rewrite customer/.* /customer/index.php;
    }
    if (!-e $request_filename){
    rewrite backend/.* /backend/index.php;
    }
    if (!-e $request_filename){
    rewrite api/.* /api/index.php;
    }
    if (!-e $request_filename){
    rewrite ^(.*)$ /index.php;
    }


FULL nginx file below
Code:
server {
    listen 80;
    listen 443 ssl;
    server_name mailwizz.dev;
    root "/home/vagrant/Code/mailwizz";

    index index.html index.htm index.php;

    charset utf-8;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    access_log off;
    error_log  /var/log/nginx/mailwizz.dev-error.log error;

    sendfile off;

    client_max_body_size 100m;

    if (!-e $request_filename){
        rewrite customer/.* /customer/index.php;
    }

    if (!-e $request_filename){
        rewrite backend/.* /backend/index.php;
    }

    if (!-e $request_filename){
        rewrite api/.* /api/index.php;
    }

    if (!-e $request_filename){
        rewrite ^(.*)$ /index.php;
    }

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
        fastcgi_connect_timeout 300;
        fastcgi_send_timeout 300;
        fastcgi_read_timeout 300;
    }

    location ~ /\.ht {
        deny all;
    }

    ssl_certificate     /etc/nginx/ssl/mailwizz.dev.crt;
    ssl_certificate_key /etc/nginx/ssl/mailwizz.dev.key;
}
 
Last edited:
The redirect is normal, you're redirected to guest/index because you are not logged in.
Have a look in the web server logs, the answer should be there.


Hi guys!

I'm having a similar problem.
in my case a bit different, I'm trying to figure out to write custom templates for mailwizz, and for that, I need Mailwizz running on my
local dev.
I use Vagrant VM or Laravel Homestead to host all my dev stuff.

So recently I've installed mailwizz on it, but for some reasons, it's not working properly.

on Vm it's run Ngnix which from default Laravel Homestead redirect port 80 to 8000, so in this case, my local mailwizz url is wizz.lc:8000
but when I try to access the URL, it redirects me to wizz.lc without the port, like where was supposed to be wizz.lc:8000/backend or customer it just drops out the port and redirects to wizz.lc/backend.

Can someone help, please, for what I'm missing out?
Jay
 
Back
Top