0

I have AWS EC2 Linux server. Currently only one wordpress multisite mode is hosted in root folder (/var/www/html).

Now I would like to host another wordpress site. So that I have enable apache virtual host.

Here is my vhost.conf

NameVirtualHost *
<VirtualHost *>
ServerName firstdomain.com
ServerAlias www.firstdomain.com
DocumentRoot /var/www/html
</VirtualHost>
<VirtualHost *>
ServerName seconddomain.com
ServerAlias www.seconddomain.com
DocumentRoot /var/www/html/seconddomain.com
</VirtualHost>

I have one php test file inside seconddomain.com folder and I can browse by www.seconddomain.com

After that I download wordpress and copy into seconddomain.com folder and change the wp-config.php.

But I got the error "This webpage has a redirect loop".

Is it because I have one wordpress in root folder or other security reason?

Regards, Alex

  • 1
    Have you tried putting the first domain in a subdirectory? – Wrought_steel Feb 5 '14 at 3:01
  • Hi, not yet. It is running website and I am afraid It might lost some URL. I need time to move word press from root folder to sub folder. Do you have any recommended article. thanks for reply. – Alex Aung Feb 5 '14 at 5:52
  • Codex is a good bible: codex.wordpress.org/Moving_WordPress – Wrought_steel Feb 7 '14 at 0:59
0

Thanks for comments.

I can manage to host two separate WordPress site on VirtualHost EC2 Linux AMI.

My mistake is I have created the vhost.conf file in under /etc/httpd/conf.d.

Correct way to enable VirtualHost on EC2 Linux AMI is as follow :

  1. go to /etc/httpd/conf
  2. open httpd.conf file
  3. go to end of file
  4. uncomment NameVirtualHost *:80 line
  5. add the virtual host

Thanks, Alex

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.