Multiple website, single wordpress one droplet apache centos 7
I’ve come to a stand still while trying to configure multiple sites on one droplet in addition to a Wordpress site that was already in existence, but is now gone due to madness and insanity.
Okay, so I originally installed Wordpress for one domain on the droplet. No problems there. I then created another domain and added it to the same droplet. No problems.
The second domain will not have any Wordpress, it will be used for hosting simple landing pages.
The problems began when I created a my2nddomain.com in the /var/www/html folder which housed my Wordpress files for the first website, thus sending me to the same site as my1stdomain.com.
I then checked out the httpd.conf file and remembered the virtual hosts thing and tried to create two different virtual hosts, with the <virtualhost *:80></virtualhost> lines in the original httpd.conf file. That worked…kind of. When trying to access my1stdomain.com it wasn’t recognizing the Wordpress files located in the DocumentRoot directory that I’d named; it was sending me to the index.html file.
So, my final grasp for a semblance of something…I decided to configure everything based off of the tut on creating apache virtual hosts on centos 7.
- (In addition to everything in the tut) First I tried creating the directories for the individual domains in the /var/www and changed the DocumentRoot for each in their respective .conf to reflect that. Didn’t work.
- Lastly, I tried creating the directories for the individual domains in the /var/www/html, and changed the DocumentRoot for each in their respective .conf. Still not working. I’m lost and blah.
Please keep in mind, I put the Wordpress files in the my1stdomain.com/public_html folder.
Any help is greatly appreciated!!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.