1

I have been having several issues with certain PHP apps lately on my Fedora nginx + php-fpm setup. I originally had this issue with Owncloud, and created a question, without much luck, but I am realizing it is a global problem.

I tried installing Drupal today and am having the same problem I had earlier. My nginx server block is as such:

 server {
            listen 80;
            server_name domainname.com;
            root /var/www/whatever;
            index index.php;

            location / {
                    try_files $uri $uri/ =404;
                    #Recommended by Drupal docs for "Clean URLs"
                    error_page 404 = @drupal;
            }

            location ~ \.php$ {
                    include fastcgi_params;
                    fastcgi_index index.php;
                    try_files $uri =404;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    fastcgi_pass 127.0.0.1:9000;
            }

            #Recommended by Drupal docs for "Clean URLs"
            location @drupal {
                    rewrite ^(.*)$ /index.php?q=$1 last;
            }
    }

This block works just fine for my Tiny Tiny RSS setup, but when I use it for Owncloud or Drupal, all assets fail to load because the URL's generated by php are mysite.com/var/www/whatever/important/stuff.pony instead of mysite.com/important/stuff.pony.

I would imagine that the issue relates to the default configuration of PHP in Fedora, but otherwise I haven't a clue what could be wrong.

MetaNova
  • 171
  • 1
  • 6

0 Answers0