0

I've been fighting this issue for quite some time and perhaps don't have a good enough understand of Apache.

I have a Bitnami Wordpress Multi-site installation running on AWS lightsail. I have 3 WP domains working fine.

I also have a 4th domain that I want to point to a custom non-Wordpress app using that same server.

A while back I asked the question: https://stackoverflow.com/questions/53638767/point-domain-to-directory-of-a-bitnami-wordpress-multi-site-instance/53705728#53705728

  • Using this, I set up my app in a separate directory with a conf directory which I planned to include a vhosts file pointing my 4th domain name to the htdocs directory in this new location.
  • The Bitnami Engineer that answered the question said to create an Alias, but unless I understand alias' incorrectly, they are only for directories. I can't use an alias for a separate domain (am I wrong?)

When I tried to add a VirtualHosts section, I received an error because I can't have both vhosts and httpd-prefix running on the same server I guess.

How can I leave httpd-prefix as-is for my wordpress multisite installation, but also point my 4th URL to the /opt/bitnami/apps/myapp/htdocs directory?

jpsnow72
  • 115
  • 1
  • 6

1 Answers1

1

Sorry, I lost the comment in the other thread. If you follow the steps I mentioned in the other topic, you will have your custom application running at yourdomain/yourapp (yourapp is the name of the alias you configured).

In case you want to deploy that application using a custom virtual host, you will need to follow the steps I mentioned there but you will need to configure the following:

  • Configure the ServerName and ServerAlias in the httpd-vhosts.conf file of your custom application.
  • Include that httpd-vhosts.conf file inside the /opt/bitnami/apache2/conf/bitnami/bitnami-apps-vhosts.conf file. You can skip the step to include the httpd-prefix.conf file inside the /opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf one.
  • Restart Apache
sudo /opt/bitnami/ctlscript.sh restart apache

To summarize: - You need to have your app's folder at /opt/bitnami/apps/yourapp. You will have 2 folders there, conf (Apache configuration files) and htdocs (files of the app) - You will configure the virtual host in the httpd-vhosts.conf file and include the app's file inside the Apache's /opt/bitnami/apache2/conf/bitnami/bitnami-apps-vhosts.conf file.

Jota Martos
  • 301
  • 1
  • 4
  • Thanks for your help again Jota! I think I am mostly there now. I have my site pointing to the appropriate directory. I am getting a 403 error now for that specific site though even though everything in htdocs is set to 755. – jpsnow72 Aug 04 '19 at 19:49
  • Disregard the problem in my previous comment... It is working! Thanks! – jpsnow72 Aug 04 '19 at 20:18