1

I need to access below url.

http://localhost/admin/logout.php/?access_token=21fd3cfe5bab26131ff5244c08e5f520&continue=/

In my NGINX server, it is redirecting me to default page. Please find below my configs : 1st config tried ##########

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

2nd config tried ##########

location / {
  #try_files $uri $uri/ /index.php?q=$uri&$args;
  }

Note : It(Script) is working in Apache server.

Updated ::::::::::::::::::::::::::::::::::::::

.conf file

server {
  server_name test.test.com www.test.test.com;
  access_log /home/log/access.log combcomed buffer=256k flush=60m;
  error_log /home/log/error.log;

  root /home/public;
  location ~ (?:^|/)\. {
   deny all;
  }

  location / {
  #try_files    $uri $uri/ /index.php;
  try_files $uri $uri/ /index.php?q=$uri&$args;
  }

  include /usr/local/nginx/conf/staticfiles.conf;
  include /usr/local/nginx/conf/php.conf;
  include /usr/local/nginx/conf/drop.conf;
  include /usr/local/nginx/conf/vts_server.conf;
}

Http response :

HTTP/1.1 302 Moved Temporarily
Date: Fri, 18 Aug 2017 14:55:04 GMT
Content-Type: text/html
Connection: keep-alive
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: /admin/main.php
Server: nginx centminmod
Content-Length: 5687
PKumar
  • 111
  • 4
  • Please include the full nginx configuration in your question and output of HTTP headers when you request the URL with `curl -v`. – Tero Kilkanen Aug 18 '17 at 14:05
  • Dear @TeroKilkanen .. I have updated the question as you asked. – PKumar Aug 18 '17 at 15:00
  • There is a control panel installed on the server. Because of the nature how control panels make non-standard modifications to installations, it is not possible to know what is wrong. You need to study all the nginx configuration files and try to find out what is wrong. At least the `combcomed` attribute in `log_format` line is not valid in standard nginx. – Tero Kilkanen Aug 18 '17 at 15:16

0 Answers0