Welcome! Log In Create A New Profile

Advanced

drupal clean urls

September 08, 2013 02:44PM
Greetings

I have followed all the instructions in the wiki, and when i set my drupal installations as the root, everything works, however, when i move my drupal into a folder i am able to get everything to work except clean urls.

Here is my drupal config:
location /blog {
# This is cool because no php is touched for static content
try_files $uri @rewrite;
}

location @rewrite {
# You have 2 options here
# For D7 and above:
# Clean URLs are handled in drupal_environment_initialize().
#rewrite ^ /blog/index.php;
# For Drupal 6 and bwlow:
# Some modules enforce no slash (/) at the end of the URL
# Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^blog/(.*)$ blog/index.php?q=$1;
}

location ~ blog/.*\.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
}

# Fighting with Styles? This little gem is amazing.
# This is for D6
#location ~ ^/sites/.*/files/imagecache/ {
# This is for D7 and D8
location ~ ^/blog/sites/.*/files/styles/ {
try_files $uri @rewrite;
}

location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}

Here is the error i am seeing in my log:
[error] 12988#0: *1 open() "/var/www/html/blog/linux" failed (2: No such file or directory), client: 192.168.1.1, server: localhost, request: "GET /blog/linux HTTP/1.1", host: "example.com", referrer: "http://example.com/blog/"

(names have been changed to protect the innocent ;)

any help is appreciated.

thanks!
Adam
Subject Author Posted

drupal clean urls

adambot September 08, 2013 02:44PM

Re: drupal clean urls

Francis Daly September 08, 2013 05:12PM

Re: drupal clean urls

adambot September 09, 2013 01:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 170
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready