I have just transferred my blog from my local webserver to Amazon EC2 Free Linux server, Everything seems to be working now except for permalinks, I disabled and re-enabled them and it still breaks.
I've tried running the script
sudo a2enmod rewrite
But it says a2enmod: command not found while logged into my server as ec2-user
Any help would be much appreciated!
Thanks
I just had this same issue and, assuming you are using httpd, you will need to go to
/etc/httpd/conf
then open http.conf by runningsudo vi httpd.conf
and then change "AllowOverride" to:You may also need to change
AllowOverride All
here:Then you need to restart httpd by running
apachectl -k restart
. Note, you may need to actually runsudo apachectl -k restart
.Let me know if that helps.
AllowOverride controls what directives may be placed in .htaccess files. It can be "All", "None", or any combination of the keywords: Options FileInfo AuthConfig Limit
when i set this on my server, then i got 503 internal server error, any advi please?
Your server may not have the AllowOverride directive enabled. If the AllowOverride directive is set to None in your Apache httpd.config file, then .htaccess files are completely ignored.
In this case, the server will not even attempt to read .htaccess files in the filesystem. When this directive is set to All, then any directive which has the .htaccess Context is allowed in .htaccess files. Example of enabled AllowOverride directive in httpd.config:
Options FollowSymLinks
AllowOverride All
This link may also be helpful: http://codex.wordpress.org/Using_Permalinks
I had to use the AllowOverride All and Options +FollowSymLinks in more than one .conf file (and I also tried a2enmod rewrite while I was at it). But it was the last .conf file that was apparently controlling that directory (the .iso we used resulted in several with the same directory ... and the first one I changed had no effect). But once they ALL had both those settings the system began working.
For Ubuntu, change the "AllowOverride All" at the following location:
"The additional step I had to take was to edit /etc/apache2/sites-enabled/000-default.
In that file you'll find an AllowOverride setting for /var/www, saying "None".
Change the setting to say: AllowOverride All "
Credit to ljonas @ http://wordpress.org/support/topic/solved-permalinks-working-in-apache2-ubuntu-1010
There are written and video instructions located here https://a1websitepro.com/enable-pretty-permalinks-amazon-web-hosting/