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 configured Apache to load KnowledgeTree (KT) through a subdomain.

# Part of http.conf file
NameVirtualHost *:80

<VirtualHost *:80>
    ServerName www.example.com
    ServerAlias example.com
    DocumentRoot /usr/local/apache2/htdocs
</VirtualHost>

<VirtualHost *:80>
    ServerName knowledgetree.example.com
    DocumentRoot /usr/local/apache2/htdocs/knowledgetree
</VirtualHost>

When I enter knowledgetree.example.com into the browser, I am supposed to see KT's login page.

Instead, I end up at knowledgetree.example.com/knowledgetree/login.php and get the message:

Not Found

The requested URL /knowledgetree/login.php was not found on this server.

In light of the URL where I end up, the error message is understandable because there is not another knowledgetree folder inside the htdocs/knowledgetree folder.

When I go to example.com/knowledgetree, everything works as expected. The index.html file calls the control.php file in the same folder. If the control.php file sees that a login is necessary, it redirects to login.php (which is also in the same folder). Perfetct.

Unfortunately, control.php somehow prefixes 'login.php' with 'knowledgetree/' and spoils everything when knowledgetree.example.com is requested.

Is it possible to configure Apache to get around this or is it necessary to make a change in KT's source?

share|improve this question

2 Answers 2

Looks like this requires a change in the KnowledgeTree config.ini - see here.

Inside the [KnowledgeTree] section, set:

rootUrl = /
share|improve this answer
up vote 0 down vote accepted

In the knowledgetree database, in the config_settings table, change the value of rootUrl to an empty string and restart Apache.

Changing the values in config.ini has no effect. It is only used during setup.

share|improve this answer

Your Answer

 
discard

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.