Author Topic: Nginx settings  (Read 8913 times)

0 Members and 2 Guests are viewing this topic.

robbie_berns

  • Jr. Member
  • **
  • Posts: 1
Nginx settings
« on: August 08, 2015, 10:30:47 AM »
Hi

I have successfully set up Mibew on Apache, but I am now trying to set up Mibew on nginx.

I cannot get the install to run, and I get an error:

2015/08/08 10:16:30 [error] 7488#0: *1 open() "/home/xxx/domains/chat.xxx.biz/public_html/install" failed (2: No such file or directory), client: 118.93.211.192, server: chat.xxx.biz, request: "GET /install HTTP/1.1", host: "chat.xxx.biz"

I have searched the forum but cannot find an answer.

Where should I start?

Thanks in advance
ROB

faf

  • Mibew Staff Member
  • Native
  • *****
  • Posts: 951
    • Mibew Messenger
Re: Nginx settings
« Reply #1 on: August 20, 2015, 11:00:36 AM »
Mibew Messenger 2.0 uses rules for Apache mod_rewrite to make own URLs human readable.

If you want to use nginx as a backend for Mibew with human readable URLs, try to convert .htaccess contents. Maybe it will help.

I've made some googling for you:


w4u

  • Jr. Member
  • **
  • Posts: 2
    • -:: Web For You ::-
Re: Nginx settings
« Reply #2 on: November 24, 2017, 01:23:02 PM »
Code: [Select]
server {
        listen *:80;

        server_name xxx.w4u.fr ;

        root   /var/www/path/web/;

        index index.php index.html;

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

        location = /robots.txt {
            allow all;
            log_not_found off;
            access_log off;
        }

        location ~ \.php$ {
            try_files /a63e8f4661b83e618f48a1ecc1b4116b.htm @php;
        }

        location @php {
            try_files $uri =404;
            include /etc/nginx/fastcgi_params;
            fastcgi_param HTTP_PROXY "";
            fastcgi_pass unix:/var/lib/php7-fpm/web.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_intercept_errors on;
        }

        location / {
            rewrite ^/$ /index.php permanent;
            rewrite ^/install\.php/(.*)$ /install.php?$1 last;
            rewrite ^/index\.php/(.*)$ /index.php?$1 last;
        }

        location ~ \.(yml|po|ini|handlebars|keep)$ {
deny all;
        }
       
        location /cron.php {
deny all;
        }

location ~ /\.ht {
deny  all;
}

        location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
                expires max;
                log_not_found off;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
                root   /usr/share/nginx/html;
        }
}