Hello,
I've read tha handbook page on how to have clean url enabled on Ubuntu and a few thread on the subject here. I use Apache locally.
The problem seems to be that nobody has a clear idea how you do it. Some say "edit /etc/apache2/sites-enabled/000-default", others tell you it's /etc/apache2/sites-available/default", and why not /etc/apache2/apache2.conf.
So it's a muddle while there should be one way that works for all Gusty users for instance. There's a video http://www.lullabot.com/files/ubuntuLocalhost.mp4 which deal with Drupal 5 and seems to say that you only need to change one word in /etc/apache2/sites-enabled/000-default and run a2enmod rewrite.
Nothing seems to work for me. :-(
Does someone have a clear idea of what should be done exactly? Your help will be much appreciated!
Comments
Hiya, not sure if this will
Hiya, not sure if this will help but I run a dapper server and find using webmin (sudo apt-get install webmin) far easier to use than editing config files for those servers it is able to work with.
Once installed (assuming you accepted the defaults), go to https://localhost:10000 and enter your username and password. Then go to servers, Apache Webserver, Global Configuration and finally Configure Apache Modules. You'll find the alias module on the left, tick it and click enable selected modules. Worked for me.
Flying (v) - The art of throwing yourself at the ground and missing
Terry Pratchett
webmin
Thanks for your message Balefire. I couldn't find webmin in the Ubuntu repos, and googling for it shows it isn't libre software but freeware, then looking it up in FSF directory, it's there. Rather puzzling!
Anyway, I'd rather do without it and learn more about Apache config if I can. :-)
--
Libres-Ailé(e)s (Association for Linux and libre software) (France, Cévennes)
oops, sorry about that - I
oops, sorry about that - I forgot to add you need to have the universe repos enabled :)
FYI, this is Balefire - I found my original username & password for Drupal.org (old email server went bang)
I've gotten this to work on
I've gotten this to work on Gutsy, and although I don't have step by step instructions in front of me, I seem to remember that there were only two main issues:
sudo a2enmod rewrite(and then make sure to restart or reload Apache so the changes take effect; it should tell you to do that on the screen).<Directory /var/www/>(or it could be a different directory if that's where your webpage is located). Shortly under that should be a lineAllowOverride None. You want to change that toAllowOverride All. You'll also need to restart Apache after that is done too.I'm pretty sure that was it, but if it still doesn't work for you then post again here. (The key thing is to remember to restart or reload Apache. Any changes you make don't take effect until after you've done that.)
As a followup to this, I
As a followup to this I have set up a development version on my workstation, running from ~/public_html. A few hassles to get it going, but I found that adding the following to ~/public_html/.htaccess sorted it out after following the instructions above:
Change <username> to your username. For some reason I had to create the ~/public_access/.htaccess file - I thought this was created automagically? I only figured this out by looking at the /var/www/.htaccess on my works linux server where Drupal is set up to run from the webroot.
Flying (v) - The art of throwing yourself at the ground and missing
Terry Pratchett
Odd.
Yeah, Drupal ships with an .htaccess file that already contains code just like that (plus lots of other good things too). Not sure why it would have disappeared for you!... sometimes when files get moved around between directories, the files beginning with a "." have a habit of getting left behind, so maybe that's what happened here?
In the general case, it should not be necessary to touch .htaccess to get clean URLs working.
The following worked for me
Same here. The following worked for me. http://ubuntuforums.org/showthread.php?p=7677302#post7677302