Changing the URL after an upgrade to 3.7 in Windows
From KnowledgeTree Community
Contents |
Steps to perform
The following steps should assist in changing the KnowledgeTree URL after an upgrade to 3.7. (Example from "http://localhost/knowledgetree" back to "http://localhost". Please note this only applies to stack installs where Apache is installed. There are two options available.
A. Change the Apache Root Directory
(This method is recommended if KnowledgeTree is the only web application setup on your server)
1. Open the following file in a text editor:
<KnowledgeTree Install Directory>\Apache2\conf\httpd.conf
2. Locate the following line:
# DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "C:\Program Files\Zend\Apache2/htdocs"
3. Configure DocumentRoot to the following path:
<KnowledgeTree Install Directory>\ktdms\knowledgetree
Example:
DocumentRoot "C:\Program Files\Zend\ktdms\knowledgetree"
4. Locate the following line:
# This should be changed to whatever you set DocumentRoot to. # <Directory "C:\Program Files\Zend\Apache2/htdocs">
5. Change the path here too
Example:
<Directory "C:\Program Files\Zend\ktdms\knowledgetree">
6. Save and close the file
7. Restart Apache
B. Setup a virtual host
(This method is recommended if KnowledgeTree is not the only web application setup on your server and currently applies to Windows operating systems only)
1. Open the following file in a text editor:
<KnowledgeTree Install Directory>\Apache2\conf\httpd.conf
2. Locate the following line:
# Virtual hosts #Include conf/extra/httpd-vhosts.conf
3. Uncomment the line by removing the # at the beginning:
Include conf/extra/httpd-vhosts.conf
4. Locate the following lines:
AllowEncodedSlashes On <Location /knowledgetree> Order deny,allow Allow from all </Location>
5. Comment out the following lines by adding a # at the beginning:
AllowEncodedSlashes On #<Location /knowledgetree> #Order deny,allow #Allow from all #</Location>
6. Locate the following lines:
<Directory "<KnowledgeTree Install Directory>\ktdms\knowledgetree"> AllowOverride All </Directory>
7. Add two lines and change it to:
<Directory "<KnowledgeTree Install Directory>\ktdms\knowledgetree"> AllowOverride All Order deny,allow Allow from all </Directory>
8. Locate the following line:
Alias /knowledgetree "<KnowledgeTree Install Directory>\ktdms\knowledgetree"
9. Comment out the line by adding a # at the beginning:
#Alias /knowledgetree "<KnowledgeTree Install Directory>\ktdms\knowledgetree"
10. Save and close the file
11. Open the following file in a text editor:
<KnowledgeTree Install Directory>\Apache2\conf\extra\httpd-vhosts.conf
12. Create a new virtual host or edit the current one in the following manner:
13. Locate the following line:
# Use name-based virtual hosting. # NameVirtualHost *:80
14. Configure the line to include your URL and port:
# Use name-based virtual hosting. # NameVirtualHost <URL>:<PORT>
(Example: NameVirtualHost localhost:80)
15. Locate the following lines:
<VirtualHost *:80> ServerAdmin webmaster@dummy-host.example.com DocumentRoot "C:\Program Files\Zend\Apache2/docs/dummy-host.example.com" ServerName dummy-host.example.com ServerAlias www.dummy-host.example.com ErrorLog "logs/dummy-host.example.com-error.log" CustomLog "logs/dummy-host.example.com-access.log" common </VirtualHost>
16. Change this to reflect your own settings:
<VirtualHost <URL>:<PORT>> ServerAdmin <your email address> DocumentRoot "<KnowledgeTree Install Directory>\ktdms\knowledgetree" ServerName <URL> ServerAlias <URL> </VirtualHost>
Example:
<VirtualHost localhost:80> ServerAdmin webmaster@dummy-host.example.com DocumentRoot "C:\Program Files\Zend\ktdms\knowledgetree" ServerName localhost ServerAlias localhost </VirtualHost>
17. Save and close the file
18. Restart apache
del.icio.us
reddit

