Report this

What is the reason for this report?

Trouble setting up two wordpress sites on the same droplet

Posted on January 23, 2018

Hi,

I have already one wordpress site on my droplet and want to get one more.

I have done this:

touch /etc/apache2/sites-available/a-c-d.net.conf

<VirtualHost *:80> ServerName a-c-d.net DocumentRoot /var/www/html/a-c-d.net/public_html RewriteEngine on RewriteCond %{SERVER_NAME} =a-c-d.net RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] </VirtualHost> <VirtualHost *:80> ServerName www.a-c-d.net

RewriteEngine on RewriteCond %{SERVER_NAME} =www.a-c-d.net RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] </VirtualHost>

sudo mkdir -p /var/www/html/a-c-d.net/public_html

sudo chown -R $USER:$USER /var/www/html/a-c-d.net/public_html

sudo chmod -R 755 /var/www/html/

sudo a2ensite a-c-d.net

sudo service apache2 reload

And then I did this beacuse it don’t work:

nano /var/www/html/a-c-d.net/public_html/index.html

<html> <head> <title>Welcome to Test.com!</title> </head> <body> <h1>Success! The test.com virtual host is working!</h1> </body> </html>

sudo a2dissite 000-default.conf

sudo systemctl restart apache2

sudo service apache2 restart

My /etc/hosts/

127.0.1.1 benja2 benja2 127.0.0.1 localhost 165.227.175.xxx benjaminthompson.org

I have an A and AAAA dns record for a-c-d.net using same IP as my first site.

www-a-c-d.net redirects to my first site.

What am I missing? Thanks !!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.