I've just setup a new site but I'm having a really really strange issue that I honestly have no idea what's causing it.

I've found that when I go into my settings.php, if I leave the $settings['file_public_path'] set to default of commented out, I get the message "The website encountered an unexpected error. Please try again later." I get the same thing if I leave the path as 'sites/default/files'

The weird thing, if I set it to the full path on the server /var/www/mysite/sites/default/files, the site will work, mostly. None of the aggregrated JS and CSS load correctly, because the path is calling that entire public path in, for example

I've turned off the aggregrated JS and CSS, which mostly works, though it looks like something is getting left out, not sure what yet. I'm really stumped on why I'm having these issues. Has anyone else experienced this before or have any idea what might be causing this? I've been googling for the better part of the day, but I haven't gotten anywhere useful.

My only guess is... my domain doesn't point to my web servers root, it points to /var/www/mysite/, but drupal might be expecting /var/www/? I don't see how to set the local server path, so it's just a guess.

Comments

jamadar’s picture

Did you try to set Public file system path from admin backend - admin/config/media/file-system
You can find below code lines in settings.php file:
* If Drupal is generating incorrect URLs on your site, which could
* be in HTML headers (links to CSS and JS files) or visible links on pages
* (such as in menus), uncomment the Base URL statement below (remove the
* leading hash sign) and fill in the absolute URL to your Drupal installation.

$base_url = 'http://www.example.com'; // NO trailing slash!

I hope this will help you.