0 votes
1 view
in AWS by (19.2k 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.6k 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

</Directory>

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 (8.9k points)
0 votes
1 answer
asked Jul 31, 2019 in AWS by yuvraj (19.2k points)
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...