4
1

Currently my BitNami application is running at http://example.com/wordpress. How can I configure my application to run in the root URL http://example.com ?

asked 05 Aug '11, 10:21

Beltran%20Rueda's gravatar image

Beltran Rueda ♦♦
11.1k81550
accept rate: 25%

closed 18 Aug '11, 04:33

kaysa's gravatar image

kaysa ♦♦
3.0k51024


Automatic approach

For some of the most popular BitNami applications (WordPress, Drupal, Joomla! or Magento), we implemented an automatic approach to change the default URL to the root. For example:

http://mydomain.com/wordpress -> http://mydomamin.com

You only have to log in the machine where you have your application installed, Virtual Machine or Cloud image and run the following command:

$ sudo /opt/bitnami/apps/wordpress/updateip --appurl /

You can follow the same approach for your application. You can find more info at http://wiki.bitnami.com/Applications

Manual approach

The default Apache document root directory is "/installdir/apache2/htdocs" folder. You can change the document root in the "/installdir/apache2/conf/httpd.conf" file to run your application in the root URL.

If you want to change the default URL from "http://example.com/your_application" to "http://example.com", you should modify the "DocumentRoot" and "Directory" lines in the httpd.conf file to point to the application "htdocs" folder. It is also necessary to comment the "Include" option. You should replace it "your_application" with drupal, wordpress, joomla or your own application.

httpd.conf

...
#                                                                                                     
# DocumentRoot: The directory out of which you will serve your                                        
# documents. By default, all requests are taken from this directory, but                              
# symbolic links and aliases may be used to point to other locations.                                 
#                                                                                                     
DocumentRoot "/installdir/apache2/htdocs"
...
#                                                                                                     
# This should be changed to whatever you set DocumentRoot to.                                         
#                                                                                                     
<Directory "/installdir/apache2/htdocs">
...
#Include /installdir/apps/your_application/conf/your_application.conf
...

Some applications also require changes in their configuration files or in the database. For instance Wordpress also saves the URL in the database. If you have changed the URL or you are trying to access from a different machine and you can see Wordpress without CSS, you have to modify the domain name or the URL you should run the following command to modify the database:


$ mysql -u root -p -e "USE bitnami_wordpress; UPDATE wp_options SET option_value='http://example.com/' WHERE option_name='siteurl' OR option_name='home';"

You can find more information in the Wiki page for each project.

link

answered 05 Aug '11, 10:29

Beltran%20Rueda's gravatar image

Beltran Rueda ♦♦
11.1k81550
accept rate: 25%

edited 02 May, 05:39

does this apply to app running on Tomcat? is the process different?

(08 Aug '11, 17:10) jenson
1

We have created a new question/answer for applications running on Tomcat

(10 Aug '11, 06:21) kaysa ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×258
×30

Asked: 05 Aug '11, 10:21

Seen: 3,962 times

Last updated: 02 May, 05:39

powered by BitNami OSQA