I have read and done all the instructions to enable Clean URLs and still Drupal tells me that my system doesn't support it. I followed the "Step by Step ..." docs and "Apache2 on Ubuntu". I checked the error.log in /var/log/apache2 and found:

[Sun Mar 07 18:01:45 2010] [error] [client 127.0.0.1] File does not exist: /var/www/chap7/admin, referer: http://127.0.0.1/chap7/?q=admin/settings/clean-urls.

It seems now that I have enabled the rewrite module in apache2, Drupal now can't find where I need to enable.
I'm running Ubuntu 9.10 and Drupal 6.16.

What have I not done correctly? Any help will be appreciated.

Thanks.

Comments

jw-black’s picture

I have the same problem. I'm setting up a fresh development server on a laptop with a relatively fresh install of Ubuntu 9.10. I had everything installed with Drupal 6.12, and fought my way through enabling clean-urls and had it working just fine. But it was complaining that I needed to apply security updates, by which it meant upgrading to 6.16.

I followed the instructions and got it upgraded, but ran into a problem with links on the admin page giving 404 errors. From googling, searching on the forums, I figured out that accessing the admin pages with dirty url's would get me there. From there I was able to get to the clean-urls admin screen and turn it off. The 404 errors went away and everything worked, but with dirty urls and a greyed enable/disable radio button in the clean-urls admin page.

Then I went back over all the steps to get clean urls working, but nothing I did worked. Tried changing httpd.conf, htaccess, all sorts of other suggestions, nothing worked.

Then I saw your post and checked my error logs file. Sure enough, there was the same error you reported. Except, mine was complaining it couldn't find /var/www/usr (just that path--nothing below it).

It seems to be looking for a non-existent path in the /var/www directory.

I guessed that this might be referring to the /usr directory. So I got sneaky and created a sym link in /var/www that ponts to /usr.

Viola! The previously greyed-out clean-urls enable/disable radio buttons lit up. I enabled clean urls, and they appear to now work, but....

Now all the url's read: localhost/usr/share/drupal6 where before it was simply localhost/drupal6.

I suspect there's some place in core that's hard-coded to look for this path and there's a boo-boo in there that was introduced with 6.16. Or a design change that somehow treats the Apache-related config files differently.

I'm not expertise enough to know my around the code in core, so I'll leave it to someone more knowledgeable to root that out.

How can I change the path? I'd prefer it to be just the hostname and everything directly under that and not under a "drupal6" directory, and certainly not under "usr/share/drupal6".

(I only know enough about Drupal to be dangerous, but I'm learning... )

jw-black’s picture

I learned that I can set the root path in /etc/apache2/sites-available/default. Change the line that says "DocumentRoot" to /usr/share/drupal6 or wherever your install directory / drupal site root is. Also change the line that says "" to have that same path.

This is probably something to which an experienced admin or developer would say "well duh...", but for a noob like me, it took some effort to figure this out. I know less about Apache than I do Drupal, but I'm learning.

So I guess as it pertains to the OP, check that the paths in /etc/apache2/sites-available/default (or whatever site you're using) match where your Drupal install is.

Sagar Ramgade’s picture

i Think you need to change the line Allowoverride none to Allowoverride none in /etc/apache2/sites-available/default

Acquia certified Developer, Back end and Front specialist
Need help? Please use my contact form

jw-black’s picture

Sagar, I think you meant to say to change it to "Allowoverride All"? I had already done that, and I'm assuming jparkerri had as well since he or she stated they had followed all the steps in the documentation.

I think its worthwhile to check the Directory information in httpd.conf.

almightybunghole’s picture

Just thought I'd chip in my experience. Same thing as the OP, had followed the instructions to enable clean URLs (AllowOverride All in the apache2.conf etc.) but it still wouldn't work. Had proved that the .htaccess file wasn't being read by putting some garbage in there, the server still worked. On checking /var/log/apache2/error.log I found the same errors.

After reading the posts in this thread I had a look at /etc/apache2/sites-available/default and found that there were two AllowOverride None entries for /var/www which must have been overriding the setting in apache2.conf. Changed that and it all sprang into life.

Thanks for the info, was very helpful!

therobyouknow’s picture

After reading the posts in this thread I had a look at /etc/apache2/sites-available/default and found that there were two AllowOverride None entries for /var/www which must have been overriding the setting in apache2.conf. Changed that and it all sprang into life.

"Changed" what, exactly?! Your/etc/apache2/sites-available/default before and after, please. What exactly did you remove/edit in this file?

And what about apache2.conf - did you need to change this or not?

therobyouknow’s picture

Solution - answer to my own question: Here's what I did:

( My problem was similar - I was getting broken links 'Not Found' - Clean URLs broken, And I was getting the following in my apache error logs ( /var/log/apache2/error.log ):

 [Fri Aug 02 09:15:27 2013] [error] [client 192.168.56.1] File does not exist: /var/www/drupal8/user, referer: http://192.168.56.101/drupal8/
[Fri Aug 02 09:15:45 2013] [error] [client 192.168.56.1] File does not exist: /var/www/drupal8/user, referer: http://192.168.56.101/drupal8/

)

Change I made:
- In /etc/apache2/sites-available/default file I changed all AllowOverride None to AllowOverride All
- Note: I made a copy the orginal default file first before I did this change and called it default.original - in case I need to refer back to (and it also helped me write this solution).

And restarted the Apache server for changes to take affect:
/etc/init.d/apache2 restart

The links are working now, things seem to be fine (will report back if I find any other issues (and solutions))

In detail:

/etc/apache2/sites-available/default BEFORE:

<VirtualHost *:80>
	ServerAdmin webmaster@localhost

	DocumentRoot /var/www
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
	</Directory>

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>

	ErrorLog ${APACHE_LOG_DIR}/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

/etc/apache2/sites-available/default AFTER:

<VirtualHost *:80>
	ServerAdmin webmaster@localhost

	DocumentRoot /var/www
	<Directory />
		Options FollowSymLinks
		AllowOverride All
	</Directory>
	<Directory /var/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
	</Directory>

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride All
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>

	ErrorLog ${APACHE_LOG_DIR}/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Credit:
http://stackoverflow.com/questions/12506753/drupal-not-found-the-request...