Enabling Mod rewrite?
I'm trying to enable Mod Rewrite on Ubuntu for my Wordpress install to allow permalinks.
I tried to run:
a2enmod rewrite
But it errored with "/Could not create /etc/apache2/mods-enabled/rewrite.load: No such file or directory". There was no "mods-enabled" directory there, so I created it. Re-ran 'a2endmod rewrite' and it ran successfully.
However, when I restarted Apache, I get:
Syntax error on line 160 of /etc/apache2/apache2.conf:
Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
…fail!
Line 160 of apache2.conf is the section preventing web browsers viewing .htaccess files…and looks correct based on other installs.
I'm guessing this is because I manually created mods-enabled, and the fact that its empty? Can anyone offer any suggestions?
Thanks
3 Replies
What does "dpkg --list | grep apache" look like?
ii apache2 2.2.16-1ubuntu3.1 Apache HTTP Server metapackage
ii apache2-mpm-prefork 2.2.16-1ubuntu3.1 Apache HTTPServer - traditional non-threaded model
ii apache2-utils 2.2.16-1ubuntu3.1 utility Programs for webservers
ii apache2.2-bin 2.2.16-1ubuntu3.1 Apache HTTP Server common binary files
ii apache2.2-common 2.2.16-1ubuntu3.1 Apache HTTP Server common files
ii libapache2-mod-php5 5.3.3-1ubuntu9.5 server-side, HTML-embedded scripting language (Apache 2 module)
Restored them all (plus the php5 module!) and it all seems fine again….strange!