Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (19.1k points)

I have just transferred my blog from my local web server 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!

1 Answer

0 votes
by (44.4k points)

Assuming you are using httpd:

Go to /etc/httpd/conf 

Then open httpd.conf:

sudo vi httpd.conf

Change the “AllowOverride” to this:

<Directory />

    Options FollowSymLinks

    AllowOverride All


Also, do this:

# 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


    AllowOverride All

Then make sure you restart httpd, use this:

apachectl -k restart

If this doesn’t work, try this:

sudo service httpd restart

Hope this helps!

Related questions

0 votes
1 answer
asked Jul 11, 2019 in AWS by Amyra (12.9k points)

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
asked Jul 31, 2019 in AWS by yuvraj (19.1k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories