Welcome Guest, Not a member yet? Register   Sign In
routes working only in local
#9

(This post was last modified: 06-11-2015, 05:18 AM by StratoKyke.)

I added http  { before server { because it gave me the same error but with the server. So read on the internet I saw that putting http { before some had resolved. But it is not for me.


If I edit the additional nginx declaration with this:

PHP Code:
## These locations would be hidden by .htaccess normally
location ^~ /application       deny all; }

location  /. { ## Disable .htaccess and other hidden files
return 404;
}

location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
rewrite ^(.*.php)/ $1 last;
}

location ~ .php$ { ## Execute PHP scripts
if (!-e $request_filename) { rewrite / /index.php last; } ## Catch 404s that try_files miss
expires        off## Do not cache dynamic content
fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
fastcgi_param  SITE_ENVIRONMENT production;
fastcgi_pass   unix:/tmp/php-fpm.sock;
include 
       fastcgi_params## See /etc/nginx/fastcgi_params




I receive a 502 bad gateway on routes.


I edit the file in this way:

Code:
proxy_buffer_size   128k;
proxy_buffers   4 256k;
proxy_busy_buffers_size   256k;
## These locations would be hidden by .htaccess normally
location ^~ /application/        { deny all; }

location  /. { ## Disable .htaccess and other hidden files
return 404;
}

location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
rewrite ^(.*.php)/ $1 last;
}

location ~ .php$ { ## Execute PHP scripts
if (!-e $request_filename) { rewrite / /index.php last; } ## Catch 404s that try_files miss
expires        off; ## Do not cache dynamic content
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
fastcgi_param  SITE_ENVIRONMENT production;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include        fastcgi_params; ## See /etc/nginx/fastcgi_params
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
}

and in this moment I have 404 page not found.


EDIT: I stop, I do not know what to do and groped.

I look for someone who can help you Sad

Site is not in any controller. Only the main one. I also tried to disable nginx but the result is the 404 page not found.

EDIT2: But if the nginx.conf serves essentially to replace the .htaccess. Not everything should work equally? Since I have not used in local .htaccess?
Reply


Messages In This Thread
routes working only in local - by StratoKyke - 06-10-2015, 10:32 AM
RE: routes working only in local - by StratoKyke - 06-10-2015, 12:42 PM
RE: routes working only in local - by RogerMore - 06-10-2015, 01:21 PM
RE: routes working only in local - by StratoKyke - 06-10-2015, 02:40 PM
RE: routes working only in local - by CroNiX - 06-10-2015, 03:31 PM
RE: routes working only in local - by StratoKyke - 06-10-2015, 03:51 PM
RE: routes working only in local - by StratoKyke - 06-12-2015, 04:32 AM
RE: routes working only in local - by CroNiX - 06-10-2015, 04:52 PM
RE: routes working only in local - by StratoKyke - 06-10-2015, 11:54 PM
RE: routes working only in local - by StratoKyke - 06-11-2015, 01:03 AM
RE: routes working only in local - by StratoKyke - 06-11-2015, 12:47 PM
RE: routes working only in local - by StratoKyke - 06-12-2015, 12:38 AM
RE: routes working only in local - by StratoKyke - 06-12-2015, 02:03 PM
RE: routes working only in local - by John_Betong - 06-12-2015, 06:40 PM
RE: routes working only in local - by StratoKyke - 06-12-2015, 09:57 PM
RE: routes working only in local - by StratoKyke - 06-13-2015, 08:53 AM
RE: routes working only in local - by StratoKyke - 06-13-2015, 10:02 AM
RE: routes working only in local - by StratoKyke - 06-13-2015, 01:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB