Hello,

I'm new in Ubuntu and Drupal so I need some help.
I installed a standard configuation (databases) in Drupal 6 on a localhost on my desktop (ubuntu 9.10).
During the installation I could not enable the clean url functionality.
I used this support http://drupal.org/node/15365
I made the mod_rewrite available in Apache2 (which was shown using apache2ctl -M)
But I have difficulties during steps 2 and 3.
2:The next step is to locate the appropriate Apache configuration file for your site.
I think in my case this is /etc/apache2/apache2.conf because /etc/httpd/conf doesn't exists.
3: The next step is to copy or include the Drupal-specific settings directly into your configuration file. There are instructions here for how to include the Drupal directives in your configuration file. Consult the .htaccess file in Drupal page for examples of rules, such as the following
This explanation is a bit to short to understand for me (with my little knowledge of drupal)
What should I copy-paste or change in my situation?
I added

<Directory /var/www/example.com>
   RewriteEngine on
   RewriteBase /
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>

and also tried

<IfModule mod_rewrite.c>
RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule> 

to the apache2.conf
but no results..

I think I'm using some procedures for webpages in Drupal that will be uploaded to a website, like www.example.com and not to a localhost (which is my case).

Can anyone teach my some insight on this matter?
Thanks a lot!

calu

Comments

yelvington’s picture

You do not need to copy any Drupal configuration into the server's configuration files. Those instructions are intended to be of use to people running dedicated servers, where moving the .htaccess directives to the server configuration might provide a slight performance improvement.

Clean URLs work out of the box with Ubuntu 9.10, if you are careful to include the .htaccess file in the Drupal directory.

Af’s picture

Hi,

If you look in your sites-available folder, you'll notice this line:

<Directory>
AllowOverride None
</Directory>

You should change the AllowOverride to All, like so:

<Directory>
AllowOverride All
</Directory>

After making the change, restart apache and it should now allow you to use clean urls.

ilw’s picture

Thanks!

It helped me a lot...

spangaroo’s picture

Thank you Afraaz.

In my new LAMP installation I made the the change you mentioned above.

<Directory>
AllowOverride All
</Directory>

There was a file called "default" that I changed:

cd /etc/apache2/sites-available

vi default

And changed "AllowOverride None" to "AllowOverride All". Clean URLs are now enabled.

Thanks again.

nco71’s picture

That completely solved my problem. Never thought to have a look here.

I was using also ubuntu 9.10 and its lamp server. It s way more difficult to configure than XAMPP but it works pretty well.

Thanks again.

Calu’s picture

I first did the AllowOverride-change using command sudo nano /etc/apache2/sites-available/default
This is the result:

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>
Then I restarted the server and received this message:
@Ubuntu:~$ sudo /etc/init.d/apache2 restart
 * Restarting web server apache2                                                apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
 ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

But nothing changed.

@ other solution:
There is already a htaccess file in my directory etc/drupal/6/

When I log in to drupal using admin settings I notice there is a message about an update. The recommended version is 6.15. I now have 6.12. Is this maybe the problem?

Thanks for helping me out!

Calu

Calu’s picture

I noticed I installed LAMP and Drupal not using root@ubuntu in the terminal but (username)@ubuntu.
Does that change something?
Should I uninstall LAMP and Drupal and reinstall it using the root in the terminal (maybe this is the default in howto's..)

thx!

Calu’s picture

Can anyone comment?
Thx!

Calu’s picture

It worked when I used the instructions in here: http://drupal.org/node/626404

# change the rewrite base in /etc/drupal/6/htaccess

from this one:
# RewriteBase /drupal
to this:
RewriteBase /drupal6

did the job!