0

I have a server with two virtual hosts pointing to the same DocumentRoot folder. In that folder there is a Magento installation that manages properly both domains.

Just in case this is important, the DocumentRoot is for both domains:

var/www/magento/htdocs/

Now I need to install a Wordpress site in a folder, but it should be visible only under one domain. That is:

www.domain1.com/blog must show the wordpress blog

www.domain2.com/blog should not show anything

I'm a newby in apache configuration, so I was wondering if someone can point me the right direction to know where to put the files in the server and how to avoid the blog being visible under the second domain.

Thanks!

2 Answers 2

0

You should put Wordpress' files anywhere outside of the DocumentRoot. Then add something like the following configuration to the config of the virtualhost you want Wordpress on.

Alias /blogs /path/to/wordpress

<Directory "/path/to/wordpress">
# Put wordpress config here.
</Directory>

The important directive here is Alias to point from a URL to Wordpress' path.

0
0

Wordpress will need configuration to get it to function under the /blog path, assuming that it's not going to be installed directly in the Magento directories. Not sure how they recommend doing it, but it'll involve either a <Location> block or an Alias directive.

Just don't include that configuration in the domain that needs to not display the blog.

1
  • "Alias" directive was what I was missing... thanks!
    – Daniel
    Apr 19, 2012 at 16:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .