I host two wordpress on AWS EC2 (say site1 and site2). The site1 works perfectly, but the site2 can only access the homepage, for other pages, encountering the following error:
Not Found
The requested URL /just-for-test/ was not found on this server.
Apache/2.4.7 (Ubuntu) Server at site2.com Port 80
Both of two sites have the same permission. The site2 configure file /etc/apache2/sites-available/site2.conf is as follows:
<VirtualHost *:80> ServerAdmin [email protected] ServerName site2.com ServerAlias www.site2.com DocumentRoot /var/www/site2.com ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> The content of /etc/hosts is as follows:
127.0.0.1 localhost #this is for site1.com, 000-default.conf xx.xx.xx.xx site2.com BTW, while accessing http://site2.com/wp-content/uploads/, everything is normal.
Index of /wp-content/uploads
Name Last modified Size Description
Parent Directory -
2015/ 2015-05-24 00:17 -
Apache/2.4.7 (Ubuntu) Server at site2.com Port 80
How to fix it?