0 votes
1 view
in AWS by (19.2k points)

I have a server from AWS EC2 service running on Linux Ubuntu and I have installed Apache, PHP, and MySQL.

I have added a .htaccess file in my document root /var/www/html.

I entered this code in it:  ErrorDocument 404 /var/www/html/404.php and it is still not showing up.

I kept entered this command multiple times: sudo service httpd restart to restart the server but no changes displayed...

How to fix this?

1 Answer

0 votes
by (44.6k points)

Enable Apache mod_rewrite module

a2enmod rewrite

add the following code to /etc/apache2/sites-available/default

AllowOverride All

Then Restart Apache2

/etc/init.d/apache2 restart

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...