0
votes

Im having strange issue with php5-fpm and nginx.

Here is my nginx configuration:

server {
    listen   80;


    root /usr/share/nginx/www;
    index index.php index.html index.htm;

    server_name example.com;

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

    error_page 404 /404.html;

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

    # pass the PHP scripts to FastCGI server listening on /var/run/php5-fpm.sock
    location ~ \.php$ {
            try_files $uri =404;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;

    }

}

So i downloaded phpbb forum nad phpMyAdmin to /usr/share/nginx/www each in its own directory. So i have two directories: /usr/share/nginx/www/phpMyAdmin and /usr/share/nginx/www/phpbb When i try to access: http://example.com/phpMyAdmin web browser downloads index.php of phpMyAdmin, but when i navigate to: http://example.com/phpbb it renders whole forum (which is written in php, so it parses php correctly). Aboove configuration is only one i have active.

Important: if i navigate to http://example.com/phpMyAdmin/index.php it works fine.

Any advices ?

I followed that tutorial while configuring my nginx: https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-debian-7

1

1 Answers

0
votes

I found out that was browser issue, not server. As i cleared cache in my browser everything worked fine.