Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have my webpage setup under example.com . Now, generally external hosted blog services like tumblr or posterous or wp would allow you to host your blog on your site i.e example.com. What I want instead is that my blog appear under example.com/b/ and so on. As I already have my webpage vhost configured for example.com. So how do I configure my apache sites?

Here is what I have for my existing apache vhost:

ServerSignature Off
ServerTokens Prod
<VirtualHost *:80>
    ServerName example.com
    ServerAlias www.example.com
    ServerAdmin admin@example.com
    DocumentRoot /opt/example/

    <Directory /opt/example/>
        Options FollowSymLinks MultiViews Includes
        AddOutputFilter Includes html

        AddHandler mod_python .py
        PythonHandler mod_python.publisher
        PythonDebug Off
        DirectoryIndex index.py index.html

    #Enable gzip for all content except images.
    SetOutputFilter DEFLATE
    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

Any pointers would be appreciated.

share|improve this question
add comment

1 Answer

This may depend on the blogging software you are using, but generally speaking, you could just put the blog installation under /opt/example/b. Since /opt/example is the docroot for example.com, example.com/b would serve whatever was under the /b/ directory for that docroot.

You could also install the blog software in an entirely different location, and add the following to your config:

Alias /b/ "/path/to/blog/installation"

Then when someone hits example.com/b, they will be served the content from /path/to/blog/installation

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.