Create a subdomain on an AWS EC2 Bitnami Wordpress instance

I am trying to create a subdomain for a site hosted on a single AWS EC2 instance. I used a bitnami one page wordpress image. I know I probably should have used a multi-site image, but I am wondering if there is any way to facilitate a subdomain that is in no way linked or linked to or contradicts the current Wordpress installation?

I am using Route 53 for DNS hosting. I tried to set up shared hosting but it didn't work and I think Bitnam has some way to manage shared hosting, I'm not sure.

Any help would be greatly appreciated.

+3


source to share


1 answer


By default, WordPress is available at the root URL of the domain or IP address, 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 into the server console using SSH .

2.- Edit the file /opt/bitnami/apps/wordpress/conf/httpd-prefix.conf

and find the following lines:

#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 a path /blog

, update the file to look like this:

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

      



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

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

      

4.- Modify them to reflect the new path as shown 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

      

0


source







All Articles