double index.php

Discussion in 'General' started by nackgr, Feb 28, 2013.

  1. nackgr

    nackgr New Member

  2. falko

    falko Super Moderator Howtoforge Staff

    Please post your vhost configuration.
     
  3. nackgr

    nackgr New Member

    Code:
    server {
            listen *:80;
    		
            
            server_name topgreek.info www.topgreek.info;
    
            root   /var/www/topgreek.info/web;
    		
    		
    		
            index index.html index.htm index.php index.cgi index.pl index.xhtml;
    		
    
    		
            error_page 400 /error/400.html;
            error_page 401 /error/401.html;
            error_page 403 /error/403.html;
            error_page 404 /error/404.html;
            error_page 405 /error/405.html;
            error_page 500 /error/500.html;
            error_page 502 /error/502.html;
            error_page 503 /error/503.html;
            recursive_error_pages on;
            location = /error/400.html {
                internal;
            }
            location = /error/401.html {
                internal;
            }
            location = /error/403.html {
                internal;
            }
            location = /error/404.html {
                internal;
            }
            location = /error/405.html {
                internal;
            }
            location = /error/500.html {
                internal;
            }
            location = /error/502.html {
                internal;
            }
            location = /error/503.html {
                internal;
            }
    		
            error_log /var/log/ispconfig/httpd/topgreek.info/error.log;
            access_log /var/log/ispconfig/httpd/topgreek.info/access.log combined;
    
            ## Disable .htaccess and other hidden files
            location ~ /\. {
                deny all;
                access_log off;
                log_not_found off;
            }
    		
            location = /favicon.ico {
                log_not_found off;
                access_log off;
            }
    
            location = /robots.txt {
                allow all;
                log_not_found off;
                access_log off;
            }
    		
            location /stats {
                index index.html index.php;
                auth_basic "Members Only";
                auth_basic_user_file /var/www/clients/client2/web2/.htpasswd_stats;
            }
    
            location ^~ /awstats-icon {
                alias /usr/share/awstats/icon;
            }
    
            location ~ \.php$ {
                try_files $uri =404;
                include /etc/nginx/fastcgi_params;
                fastcgi_pass 127.0.0.1:9011;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_script_name;
                fastcgi_intercept_errors on;
            }
    		
            location /cgi-bin/ {
                try_files $uri =404;
                include /etc/nginx/fastcgi_params;
                root /var/www/clients/client2/web2;
                gzip off;
                fastcgi_pass  unix:/var/run/fcgiwrap.socket;
                fastcgi_index index.cgi;
                fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                fastcgi_intercept_errors on;
            }
    
            try_files $uri $uri/ /index.php?q=$uri&$args;
    
    	
    }
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Can you try
    Code:
    try_files $uri $uri/ /index.php?$args;
    instead?
     
  5. nackgr

    nackgr New Member

    wokrs thanks
     

Share This Page