I really don't know about Bitnami, but to add WordPress to a sub directory, you need two things:
a
index.php
in the root dir containing nothing than the following:<?phpdefine('WP_USE_THEMES', true);require( dirname( __FILE__ ) . '/YOUR-SUB-DIR/wp-blog-header.php' );
In case you are using Apache, a
.htaccess
file containing the following:RewriteEngine OnRewriteCond %{HTTP_HOST} ^(www.)?example.com$RewriteRule ^(/)?$ YOUR-SUB-DIR [L]RewriteRule . index.php [L]
Basically that's it. I can't tell you how to set it up on lighttp or nginx, but above is a sure shot on Apache with a single site install. If you are moving to a multisite/network install, you will have to set the relevant constant in your installs wp-config.php
file, active the network through the admin UI and then follow the steps to update your .htaccess
and wp-config.php
file.
EDIT You want
blog.example.com
as your main domain - so add it as such in the WP admin UI settings. It seems you got a single site install, but "any wordpress links to remain under blog.example.com/xyz" is pretty cryptic in WordPress terms. Permalink structure is what you choose under "admin > Settings > Permalinks". If the site redirects you to example.com?query=arg
, then you obviously have set example.com
as your WordPress main domain.