Unable to point URL to correct folder inside apache/htdocs

Type: Bitnami Support Tool

Description:
my site /app is located in /opt/bitnami/apache/htdocs/abc but my URL is opening index.html page which is located in root folder whereas I want my other folder to open whenever I open URL.

Hello @kirbyfran56,

Could you please take a look at our documentation to create a custom PHP? Apache configuration is explained there.
https://docs.bitnami.com/aws/infrastructure/lamp/administration/create-custom-application-php/

I hope it helps

1 Like

Thanks for your response David but I’m doing that but still unable to solve the issue nd getting confused with myapp (is it our site name or it is myapp by default)?

Hi @kirbyfran56,

In the example, myapp is the folder where you place your app files. If it has a different name, you need to change it. Note that our recommended standard is to place them under /opt/bitnami/myapp or /opt/bitnami/apps/myapp depending of the approach, but we don’t use /opt/bitnami/apache/htdocs for custom apps.

Regards

1 Like

Thanks for response David I’ll try it and let you know. By the way do I Shift entire app folder from htdocs to /opt/bitnami/xyz where xyz is app name, isn’t it?

Also, how to configure custom app and virtual host ? Please help as tomorrow is our last day for submitting it. Any help will be very much appreciated.

Hi @kirbyfran56,

If your folder is xyz you should change every appearance of myapp with xyz. That is:

  • Run the following commands to create the directories and assign the necessary permissions.
sudo mkdir /opt/bitnami/xyz
sudo chown -R bitnami:daemon /opt/bitnami/xyz
sudo chmod -R g+w /opt/bitnami/xyz
  • Create and edit the /opt/bitnami/apache2/conf/vhosts/xyz-vhost.conf file and add the configuration block shown below:
  <VirtualHost 127.0.0.1:80 _default_:80>
    ServerAlias *
    DocumentRoot /opt/bitnami/xyz
    <Directory "/opt/bitnami/xyz">
      Options -Indexes +FollowSymLinks -MultiViews
      AllowOverride All
      Require all granted
    </Directory>
  </VirtualHost>
  • Create and edit the /opt/bitnami/apache2/conf/vhosts/xyz-https-vhost.conf file and add the configuration block shown below:
 <VirtualHost 127.0.0.1:443 _default_:443>
    ServerAlias *
    DocumentRoot /opt/bitnami/xyz
    SSLEngine on
    SSLCertificateFile "/opt/bitnami/apache2/conf/bitnami/certs/server.crt"
    SSLCertificateKeyFile "/opt/bitnami/apache2/conf/bitnami/certs/server.key"
    <Directory "/opt/bitnami/xyz">
      Options -Indexes +FollowSymLinks -MultiViews
      AllowOverride All
      Require all granted
    </Directory>
  </VirtualHost>
  • Restart the Apache server:
sudo /opt/bitnami/ctlscript.sh restart apache

Regards

1 Like

Again,Thanks David for your swift support. I’m very much Obliged & will do as mentioned above and let you know.

by the way what should be inside bitnami.conf file(mainly document root & directory) if my app folder is in /opt/bitnami/xyz wherein xyz is Appname.

my issue got resolved but i would like to know about configuration in xyz-vhost.conf & xyz-https-vhost.conf for mutisites.

Hi @kirbyfran56,

I think this link may help:
https://docs.bitnami.com/aws/apps/wordpress/get-started/understand-config/

I’m glad you solved the issue.

Regards

1 Like

Thanks for your support.

Thank you for the lInk.

I’m unable to access my wordpress sites though by entering server IP I’m able to access my 1 WP site I’m here to use 2 sites from a domain but when I enter http://server-IP/site2 it shows Page not found error.

Regards
Fran

Hello @kirbyfran56,

In that case, please open a new ticket as Technical Issue instead of Bitnami Support Tool:

Screenshot 2021-07-16 at 10.05.30

The team will use your support tool output to check your configuration and try to help there.

Regards

I raised ticket but answer on that and it’s been 1 day and work is urgent. Please guide how can I run 2 WordPress sites from a single WP-Admin i.e. multi sites !! Any updates please let me know.
Any help will be appreciated.

Regards
Fran

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.