Forum

URL toolkit problem

Michael David
1 June 2013, 06:37
I just have one more problem...

A client of mine runs a drupal site.

The site is loaded from /home/xyz/public_html

However a WordPress blog is loaded from /home/xyz/public_html/blog/

In other words, example1.com loads the drupal site while example1.com/blog loads the WordPress blog.

The issue is I want to have per directory URLtoolkits

I tried this config:
VirtualHost {
Hostname = www.example1.com, *.example1.com
WebsiteRoot = /home/xyz/public_html
StartFile = index.php
AccessLogfile = /home/xyz/logs/access.log
ErrorLogfile = /home/xyz/logs/error.log
UseFastCGI = xyz
ExecuteCGI = yes
TimeForCGI = 15
UseGZfile = yes
}

Directory {
Path = /home/xyz/public_html
UseToolkit=Drupal
}

Directory {
Path = /home/xyz/public_html/blog
UseToolkit=WordPress
}

I get a syntax error on the UseToolkit lines when I restart hiawatha.

How do I make this work?

Thanks
Michael
Hugo Leisink
1 June 2013, 09:56
Don't try to put two websites in one virtualhost. Use a separate virtual host for each website.
VirtualHost {
Hostname = blog.example1.com
WebsiteRoot = /home/xyz/websites/wordpress
...
UseToolkit = wordpress
}

VirtualHost {
Hostname = www.example1.com, *.example1.com
WebsiteRoot = /home/xyz/websites/drupal
...
UseToolkit = Drupal
}


If you really want the blog to be available under www.example1.com/blog
UrlToolkit {
ToolkitID = wordpress
Match ^/blog/(.*) Rewrite /$1 Continue
...
}

VirtualHost {
Hostname = blog.example1.com
WebsiteRoot = /home/xyz/websites/wordpress
...
UseToolkit = wordpress
}

VirtualHost {
Hostname = www.example1.com, *.example1.com
WebsiteRoot = /home/xyz/websites/drupal
...
UseToolkit = Drupal
ReverseProxy ^/blog.* http://blog.example1.com/
}
Michael David
1 June 2013, 19:29
Thank you so much Hugo. I will try them.

Amazing support here.
This topic has been closed.