5

I'm trying to create a sub-domain for a website hosted on a single AWS EC2 instance. I used a bitnami single site wordpress image. I know I probably should've used a multisite image but I'm wondering if there's any way I could facilitate a sub-domain which will in no-way be associated or linked to or conflicting with the current Wordpress installation?

I'm using Route 53 for DNS hosting. I've tried to configure virtual hosting but it didn't work out and I think bitnami has some way of managing virtual hosting itself, I'm unsure.

Any help would be greatly appreciated.

  • For those who are having problems similar to this, I encourage you to browse through the Bitnami documentation, something I failed to do, or perhaps it wasn't as clear back in 2015. For this particular issue the following article and/or below answer from Carlos should help: https://docs.bitnami.com/virtual-machine/infrastructure/lamp/configuration/configure-custom-application/ – Kamil Kubiak Mar 03 '19 at 14:37

1 Answers1

2

By default, WordPress is available at the domain or IP address root URL, such as http://SERVER-IP or http://example.com. To move WordPress to a different path on the same domain or IP address, such as http://SERVER-IP/blog or http://example.com/blog, follow these steps:

1.- Log in to the server console using SSH.

2.- Edit the /opt/bitnami/apps/wordpress/conf/httpd-prefix.conf file and find the lines below:

#Alias /wordpress/ "/opt/bitnami/apps/wordpress/htdocs/"
#Alias /wordpress "/opt/bitnami/apps/wordpress/htdocs"

Uncomment and update the Alias directives to reflect the new path. For example, to move WordPress to the /blog path, update the file to look like this:

Alias /blog/ "/opt/bitnami/apps/wordpress/htdocs/"
Alias /blog "/opt/bitnami/apps/wordpress/htdocs"

3.- Look for the lines below in the file /opt/bitnami/apps/wordpress/htdocs/wp-config.php file:

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/');

4.- Modify them to reflect the new path, as below:

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/blog');
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/blog');

5.- Restart Apache:

sudo /opt/bitnami/ctlscript.sh restart apache
  • Hi there, I also have wordpress bitnami website running on sub-domain,on an ec2 instance ,However,I want it to point to the top domain i.e. from "newsite.sitename.com" to newsite.com – quintumnia Jul 29 '21 at 11:50