Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: tkibugu on December 23, 2009, 02:00:21 PM

Title: Changing SMF forum URL
Post by: tkibugu on December 23, 2009, 02:00:21 PM
Hi, I installed SMF for my LAN. I failed to change the forum base url from example.com/forum to example.com/forums even after  I followed instructions in the wiki (http://wiki.contribs.org/SMF). How do I accomplish that? Thanks.
Title: Re: Changing SMF forum URL
Post by: cactus on December 23, 2009, 02:11:49 PM
Hi, I installed SMF for my LAN. I failed to change the forum base url from example.com/forum to example.com/forums even after  I followed instructions in the wiki (http://wiki.contribs.org/SMF). How do I accomplish that? Thanks.
You can not do such a modification as you desire through this method, you can only change the FQDN name/base URL, not the path on this domain as the header in the wiki already states.

To make the modification you desire you will most likely have to make some additional changes to the webserver configuration files. Since they are templated you most likely will have to create a custom template fragment for the SMF section in order to share your SMF folder on your file system in to the web space using /forums instead of /forums.
More details on the template system is in the SME Server Development Guide linked in the wiki.
Title: Re: Changing SMF forum URL
Post by: tkibugu on December 31, 2009, 08:25:25 AM
Hi cactus,

I did this:
Code: [Select]
mkdir -pv /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
cp -av /etc/e-smith/templates/etc/httpd/conf/httpd.conf/98SMF /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
Then, changed "Alias /forum /opt/SMF" to "Alias /forums /opt/SMF" in /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/98SMF
Then:
Code: [Select]
expand-template /etc/httpd/conf/httpd.conf
svc -h /service/httpd-e-smith
Then accessed the page at example.com/forums whereby it loaded without the normal theme. Also, I was unable to login. Please advice. Thanks.
Title: Re: Changing SMF forum URL
Post by: cactus on December 31, 2009, 08:43:26 AM
Hi cactus,

I did this:
Code: [Select]
mkdir -pv /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
cp -av /etc/e-smith/templates/etc/httpd/conf/httpd.conf/98SMF /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
Then, changed "Alias /forum /opt/SMF" to "Alias /forums /opt/SMF" in /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/98SMF
Then:
Code: [Select]
expand-template /etc/httpd/conf/httpd.conf
svc -h /service/httpd-e-smith
Then accessed the page at example.com/forums whereby it loaded without the normal theme. Also, I was unable to login. Please advice. Thanks.
Above is correct, but I guess somewhere in the code base the old URL is still used as base URL. Now you most likely also need to apply the instruction you can find here and perhaps might have done earlier: http://wiki.contribs.org/SMF.

If you can not login, you might be able to edit the configuration file using a text editor when logged in as root.
Title: Re: Changing SMF forum URL
Post by: tkibugu on December 31, 2009, 01:35:25 PM
Hi cactus,
It seems the order of making the changes matter.
After installing:
1. I loaded the page example.com/forum.
2. logged in as admin
3. Then went to "ADMIN" -> "Server Settings" -> "CORE CONFIGURATION", and changed the setting for "Forum URL" to http://example.com/forums and saved changes. Then a "404 Not Found" "The requested URL /forums/index.php was not found on this server." error appears.
4. At this point I then followed the steps in post above
5. I reloaded example.com/forums (No theme at this point)
6. Then went to "Themes and Layout" -> "THEMES AND SETTINGS" -> "SMF Default Theme" and changed specified URLs from .../forum/.. to .../forums/... I did the same for "Classic YaBB SE Theme" and "Babylon Theme"

Thanks.
Title: Re: Changing SMF forum URL
Post by: cactus on December 31, 2009, 01:36:57 PM
You could have achieved the URL change through modifying the configuration file most likely as well, but I am glad you got it sorted.