Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29422

Permalinks give 404 error in WordPress on AWS EC2 instance running Ubuntu 16.04

$
0
0

I have created an AWS (Ubuntu 16.04) AMI. Installed WordPress and uploaded my Custom theme. Both operations went fine.

I put my site inside /var/www/html.

This is a fresh installation. I created two two pages /login and /forbidden. In Permalinks page I have selected Post Name option.

The site has .htaccess file in place (root) with the following content:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

But whenever I am trying to access http://ec2-54-174-120-1.compute-1.amazonaws.com/login I get 404 error.

Configuration in: /etc/apache2/apache2.conf

<Directory /var/www/html>
   Options Indexes FollowSymLinks
   AllowOverride All
   Require all granted
</Directory>

DocumentRoot /var/www/html is set in both /etc/apache2/sites-availabe/000-default.conf and /etc/apache2/sites-enabled/000-default.conf

I restarted Apache server several times with no luck.

sudo service apache2 restart


Viewing all articles
Browse latest Browse all 29422

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>