yetishare nginx help

sjawan853733

Member
YetiShare User
Mar 14, 2014
29
0
6
hi i have install webuzo with php 7.0 centos 7 our nginx config is

Code:
#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

pid		/usr/local/apps/nginx/var/log/nginx.pid;

events {
	worker_connections  1024;
}

error_log /usr/local/apps/nginx/var/log/error_log debug;


http {
	include	   mime.types;
	default_type  application/octet-stream;

	log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
					  '$status $body_bytes_sent "$http_referer" '
					  '"$http_user_agent" "$http_x_forwarded_for"';

	access_log /usr/local/apps/nginx/var/log/web.access.log  main;

	sendfile		on;
	#tcp_nopush	 on;

	#keepalive_timeout  0;
	keepalive_timeout  65;

	#gzip  on;
	
	client_max_body_size 200M;
	
	# If your domain names are long, increase this parameter.
	server_names_hash_bucket_size 64;
	
	# To hide the version number in headers
	server_tokens off;
	
	include /usr/local/apps/nginx/etc/conf.d/*.conf;
}
i replace with yetishare given nginx config but its not work every page show 404 error . can please anyone help me how to work on webuzo
 

chatgyi

New Member
YetiShare User
YetiShare Supporter
Aug 20, 2017
24
2
3
Check here >> https://support.mfscripts.com/public/kb_view/62/
 

sukhman21

Member
YetiShare User
YetiShare Supporter
Jan 26, 2015
508
3
18
You are getting 404 because you dont have any rewrite rules in your nginx config. Obviously you didnt read the manual.
 

sjawan853733

Member
YetiShare User
Mar 14, 2014
29
0
6
i use like it

Code:
#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

pid		/usr/local/apps/nginx/var/log/nginx.pid;

events {
	worker_connections  1024;
}

error_log /usr/local/apps/nginx/var/log/error_log debug;


http {
	include	   mime.types;
	default_type  application/octet-stream;

	log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
					  '$status $body_bytes_sent "$http_referer" '
					  '"$http_user_agent" "$http_x_forwarded_for"';

	access_log /usr/local/apps/nginx/var/log/web.access.log  main;

	server {
    listen       80;
    server_name  localhost; # change this for your server
    root /home/shr/public_html;
    index index.php;
    client_max_body_size 5G;

    # handle requests to the API
    location ~ /api/v2/(.+)$ {
        if (!-e $request_filename) { rewrite ^/api/v2/(.*) /api/v2/index.php?_page_url=$1 last; }
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    location ~ \.php$ {
        if (!-e $request_filename) { rewrite ^/(.*) /index.php?_page_url=$1 last; }
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    location / {
        if (!-e $request_filename) {
                rewrite ^/(.*) /index.php?_page_url=$1 last;
        }
    }

    location /files/ {
        internal;
    }

    # these locations would be hidden by .htaccess normally
    location /core/logs/ {
        deny all;
    }

    location ~* "/\.(htaccess|htpasswd)$" {
        deny    all;
        return  404;
    }
}

        sendfile		on;
	#tcp_nopush	 on;

	#keepalive_timeout  0;
	keepalive_timeout  65;

	#gzip  on;
	
	client_max_body_size 200M;
	
	# If your domain names are long, increase this parameter.
	server_names_hash_bucket_size 64;
	
	# To hide the version number in headers
	server_tokens off;
	
	include /usr/local/apps/nginx/etc/conf.d/*.conf;
}
in this i use config of yetishare but its also show 404 error on all pages only front page show fine
 

sukhman21

Member
YetiShare User
YetiShare Supporter
Jan 26, 2015
508
3
18
your issue may be with the fastcgi_pass 127.0.0.1:9000; line. You may not be using the TCP port. Check the PHP-FPM and make sure you are using TCP port otherwise try this fastcgi_pass unix:/var/run/php-fpm.sock; or php5-fpm.sock, etc depending on your server.