Author Topic: way to change default URL root?  (Read 5545 times)

0 Members and 1 Guest are viewing this topic.

Offline bc

  • Occasional poster
  • *
  • Posts: 3
    • View Profile
way to change default URL root?
« on: June 11, 2014, 10:09:57 AM »
Hi, I would like to know if there is a way to change the root of the FHFS URL to include a sub-path. For example, after a fresh installation the main site is at:
http://192.168.1.1/

...my goal is to have the main page (and everything else) below:
http://192.168.1.1/webbox/

..so a user "test" would have their home as:
http://192.168.1.1/webbox/.test
..and everything else FHFS has to do would be below /webbox/.

Can this be done, or is FHFS hardcoded to run as it is.

Thanks in advance
Balazs

Offline bmartino1

  • Tireless poster
  • ****
  • Posts: 837
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
Re: way to change default URL root?
« Reply #1 on: June 11, 2014, 02:34:08 PM »
it is possible, but you will have to move quite a bit of stuff around..
As 'm still new to fhfs:
(i claim no responsibility after/ if you use these step as this may prevent fhfs form working properly...)

For starters in hfs
The house or ( / ) right click mouse > Properties > different template tab

--- this is the first web page code that launches many or scripts...----

to my understanding you want a "webpage before this and move that script down to "webbox"
*copy the text in here...

now/so go to:
C:\Program Files\FHFS
and make a new folder and call it webbox

add it to hfs as a real folder
The webbox folder>  right click mouse > Properties > different template tab
put your earlier copied  text in webbox.

go back to
The house or ( / ) right click mouse > Properties > different template tab
and change it to a html web code such as:
-----
</html>
<head></head>
<body>
<a href="http://192.168.1.1/webbox/">Visit Webbox</a>
</body>
</html>
------

now open your webpage
http://192.168.1.1/

you should be visited by a blank page with a link with words that say "visit Webbox"

clicking on that will bring you to the original page for fhfs....

To over you user accounts?
I don't recommend it, as they will be hidden web folders under the house and changing/moving them will most likely cause fhfs issues..

otherwise you will have to find the "real folder" path in hfs resources... and re add them to "webbox"....

Good luck and have fun. :/
I'm only trying to help i mean no offense.
thank you for your time and patience,
Bmartino1

Offline bc

  • Occasional poster
  • *
  • Posts: 3
    • View Profile
Re: way to change default URL root?
« Reply #2 on: June 11, 2014, 02:59:16 PM »
Hi, thanks very much for this. The main site is now running on /webbox, so that is a good thing. This is a new server, so I don't mind it if something breaks, but I do need to move the user folder as well. Right now I start out as:

http://192.168.1.1/webbox
...for the main page, but after I log in as a test user I get redirected to:
http://192.168.1.1/.test

I'm sure this is working as designed, but I'd need to make it so that after login I get redirected to:
http://192.168.1.1/webbox/.test
..even if I have to move around folders, that is fine. Could you please elaborate a bit more on "otherwise you will have to find the "real folder" path in hfs resources... and re add them to "webbox"...."? How do I go about this exactly..  ???

Thanks very much
Balazs


Offline bmartino1

  • Tireless poster
  • ****
  • Posts: 837
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
Re: way to change default URL root?
« Reply #3 on: June 12, 2014, 12:46:40 AM »
Quote:
otherwise you will have to find the "real folder" path in hfs resources... and re add them to "webbox"....

it been a while(since i had to find and edit my "resources") and i can't seem to find it nor remember a way to do exactly what i said, but i do have a solution...

since you have your .test folder user in, we just need to find where the .test user file path on the windows side
right mouse click the .test folder and click "open it" (highlighted and the f8 button...works to :) )

this is the folder path that should be re added to your path for webbox> .test (use the same folder name for the user!)

there are probably some scripts somewhere in fhfs that redirect (house {root} > .test) which is why i don't recommenced going much further on this as filezila might put files there..
(meaning that you will have to keep .test at the root (and add the same path to webbox) as a fail/file safe backup until a more experience user such as the creator(raybob) of fhfs can help you further on this...)
---

But we can have them to be a redirect the user...
*see attachment

on the house (/) {any folder really...} right mouse click > properties > Permissions tab

*bottom right corner "managee accounts" > (options windows > account tab)
Your "test" user should be in here... click on your test user and at the right (ion the picture circled in blue)
under redirect put: http://192.168.1.1/webbox/.test

now, when the user logs in the user will auto login to that page and be taken to that path

*Note - (repeat what i'm trying to say/do):
(again, i recommend to just re-add the user folders (the resources that are goign to hfs) and readded them as a real folder under your webbox folder path)

Probably not the way you want to go but is a possible solution.

as this is reading the resource and puting a login redirect, not oving the resource to your file path, i will have to look into this, or a more experience fhfs user will be of more/better help.

Good luck  :)
I'm only trying to help i mean no offense.
thank you for your time and patience,
Bmartino1

Offline bmartino1

  • Tireless poster
  • ****
  • Posts: 837
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
Re: way to change default URL root?
« Reply #4 on: June 12, 2014, 01:08:40 AM »
from raybob the creator:
http://www.rejetto.com/forum/fhfs/what-is-fhfs/msg1059020/#msg1059020

*unknown path and websites, but this may also help:

Quote: raybob form above post:

FHFS has a lot of more advanced features and pages including a big HTTP admin console.
http://127.0.0.1/~admin

Check out the wikipedia page for a bigger list of original features.
http://en.wikipedia.org/wiki/FHFS_(File_Server) - http link missing ")"...

http://tinyurl.com/nesez98  (^ same as page above... don't know why wiki links fail in posting... :( )
« Last Edit: June 12, 2014, 02:40:14 AM by bmartino1 »
I'm only trying to help i mean no offense.
thank you for your time and patience,
Bmartino1

Offline bmartino1

  • Tireless poster
  • ****
  • Posts: 837
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
Re: way to change default URL root?
« Reply #5 on: June 12, 2014, 01:16:19 AM »
wiki claims that you have control over:
Admin can choose where to store user files

... i don't know how, nor where to go, sorry, but i think this is as far as i can be of help. good luck!
I'm only trying to help i mean no offense.
thank you for your time and patience,
Bmartino1

Offline bmartino1

  • Tireless poster
  • ****
  • Posts: 837
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
Re: way to change default URL root?
« Reply #6 on: June 12, 2014, 02:05:34 AM »


you set your user paths before you begin, so you wil have to delte the fhfs folder and start all over

copy the instaleer and launch fhfs launch, see picture...

add your folder webbox before continuing,,,

I think i anaswered my own question:
see picture

its at the base point when you first start and inatlize fhfs
http://127.0.0.1/~installer
I'm only trying to help i mean no offense.
thank you for your time and patience,
Bmartino1

Offline bmartino1

  • Tireless poster
  • ****
  • Posts: 837
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
Re: way to change default URL root?
« Reply #7 on: June 12, 2014, 02:53:04 AM »
Just to let you know that i have just re installed fhfs, and changed the above line to move my users to a folder here is a screen shot, as i think you are wanting to move folders around in hfs...

see pictures...

:)

Good luck and have fun!
I'm only trying to help i mean no offense.
thank you for your time and patience,
Bmartino1

Offline bc

  • Occasional poster
  • *
  • Posts: 3
    • View Profile
Re: way to change default URL root?
« Reply #8 on: June 12, 2014, 09:24:32 AM »
Hi, thanks for all this. I did the redirection part, and it -sort of- works, but not fully. After the test user logs in I do get redirected to the right path http://IP/webbox/.test, but I get a 404 - File not found error. The physical folder is there in the path, but some sort of rights must be missing...

Offline bmartino1

  • Tireless poster
  • ****
  • Posts: 837
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
Re: way to change default URL root?
« Reply #9 on: June 12, 2014, 09:34:47 PM »
Note to be public to the web you need to setup port forwarding:
-----
2.1 is the current version.  Yes, you have to set up port forwarding for whatever ports you're using (80 for HTTP, 443 for HTTPS, 21 for FTP, 990 for FTPS)
Keep hfs in fhfs at port 80! otherwise there will be port/setting file and folder conflicts...
----

ok, i will try to make this as easy as possible:

Defining areas:
I'm using windows 7 pro 32bit... ( I will be giving info on a windows 7 machine, those with other os or different os will have to figure out a similar way to do theses steps....)

For me and my tutorial my FHFS will and should be located at:
C:\Program Files\FHFS

(it can be at other areas, but i'm going to keep it here for simplicity),,,

first you will have to start over...
copy your different templates html or be prepared to redo some areas in your hfs...

Delete your fhfs folder
C:\Program Files\FHFS

make a new folder in your "program files":
C:\Program Files\FHFS

this folder should now be empty:
C:\Program Files\FHFS

go to the download link: (version 2.1)
http://sourceforge.net/projects/fhfs/files/2.1.x/2.1.0/FHFS%202.1.0%20Install.zip/download

extract the zip folder and put the files in
C:\Program Files\FHFS

---cmd dir of that directory:
*Yours should be similar to this*

I have extra stuff so don't worry if you don't have a folder ...
Directory of C:\Program Files\FHFS

06/12/2014  03:52 PM    <DIR>          .
06/12/2014  03:52 PM    <DIR>          ..
10/12/2012  11:22 PM             1,753 access-authentication.tpl
08/16/2012  07:27 PM             1,772 account-create.tpl
11/02/2013  08:31 PM               781 account-delete.tpl
11/06/2013  08:56 PM            33,035 admin.ajaxfunctions.tpl
11/03/2013  08:20 PM             1,622 admin.authenticate.tpl
11/06/2013  08:36 PM            25,142 admin.javascript.js.tpl
11/06/2013  08:36 PM            32,199 admin.main.tpl
11/03/2013  10:27 PM             8,122 admin.usertable.tpl
11/06/2013  09:16 PM               734 ajax.accountdeletion.tpl
11/04/2013  05:00 PM             1,364 ajax.admin.tpl
11/06/2013  09:16 PM             1,420 ajax.changepwd.tpl
11/06/2013  09:14 PM             1,115 ajax.comment.tpl
11/06/2013  09:12 PM             1,510 ajax.contact.tpl
11/06/2013  09:14 PM             2,341 ajax.delete.tpl
11/06/2013  09:14 PM               980 ajax.ftp.tpl
11/06/2013  09:14 PM             1,684 ajax.hashcalc.tpl
11/05/2013  05:58 PM             7,962 ajax.installer.tpl
11/06/2013  09:17 PM             3,350 ajax.lostpassword.tpl
11/06/2013  09:17 PM             1,475 ajax.move.tpl
11/06/2013  09:18 PM             1,527 ajax.newfolder.tpl
11/06/2013  09:18 PM             3,885 ajax.passwordreset.tpl
11/06/2013  09:19 PM             2,985 ajax.preferences.tpl
11/06/2013  09:20 PM             2,425 ajax.rename.tpl
11/06/2013  09:20 PM             1,601 ajax.share.sendmail.tpl
11/06/2013  09:20 PM             1,084 ajax.sharefolder.tpl
11/06/2013  09:22 PM             5,349 ajax.signin.tpl
11/06/2013  09:15 PM               891 ajax.submission-resend.tpl
11/06/2013  07:06 PM             6,084 ajax.submission.tpl
11/06/2013  09:14 PM             2,686 ajax.switch.tpl
11/06/2013  09:16 PM             1,067 ajax.validate.tpl
07/20/2012  07:13 PM               170 alert.vbs
10/27/2011  06:13 PM                88 ban.tpl
02/20/2013  10:02 PM             1,483 buttonheaders.tpl
06/30/2012  09:56 PM               201 checksession.tpl
11/04/2013  04:03 PM             2,624 choose public private.tpl
11/03/2013  07:24 PM               826 configure-filezilla.tpl
11/02/2013  09:27 PM             2,449 configure-stunnel.tpl
08/26/2012  11:30 PM             2,704 contact.tpl
10/27/2011  06:39 PM            10,342 countryselect.tpl
04/04/2012  06:07 PM                93 decodemacros.php
07/17/2012  01:28 AM             3,178 delete-confirm.tpl
09/11/2012  10:51 PM             1,364 deny.tpl
04/06/2012  12:24 AM               264 domain directory.tpl
09/29/2012  12:20 AM         2,959,376 dotnetfx35setup.exe
03/01/2013  03:31 PM               875 emailsettings.tpl
09/12/2012  03:35 PM               503 encodethumb.php
07/17/2012  01:28 AM               650 error-page.tpl
06/11/2014  10:32 PM               394 features.db
06/11/2014  09:51 PM             1,383 FHFS_Launcher - Shortcut.lnk
11/06/2013  07:31 PM            37,376 FHFS_Launcher.exe
10/03/2012  11:16 PM               784 filelist.tpl
06/11/2014  10:32 PM    <DIR>          filezilla-bin
10/16/2012  03:52 PM             1,023 foldersize.tpl
11/22/2012  09:11 PM               359 foldersizebat.tpl
11/05/2013  08:51 PM             5,632 FolderStats.exe
02/20/2013  10:02 PM             1,956 footer-new.tpl
11/02/2013  07:57 PM            10,368 ftp.tpl
06/11/2014  09:37 PM             4,229 ftpconfig.xml
07/19/2012  07:04 PM             1,176 ftpdata-anon1.xml.tpl
09/01/2011  03:11 PM               252 ftpdata-anon2.xml.tpl
11/02/2013  10:15 PM               933 ftpdata-anonymous.xml.tpl
11/03/2013  07:44 PM             4,229 ftpdata-settings.xml.tpl
11/02/2013  10:21 PM             3,139 ftpdata-user.xml.tpl
11/05/2013  05:59 PM             5,707 functions.tpl
03/01/2013  03:32 PM             1,113 generatethumbs.tpl
11/04/2013  04:05 PM             3,155 global.css
10/02/2012  09:21 PM             4,251 global.js
11/08/2013  11:41 AM            11,025 hfs.events
06/11/2014  10:37 PM             5,088 hfs.ini
11/06/2013  07:57 PM             4,016 hfs.ini.original
06/11/2014  10:37 PM            50,292 hfs.tpl
06/11/2014  09:44 PM             7,333 hfs.vfs
06/11/2014  09:43 PM             7,157 hfs.vfs.bak
07/21/2012  04:24 PM               230 hfs.vfs.original
06/11/2014  09:07 PM    <DIR>          imagemagick-bin
07/20/2012  11:44 PM             1,787 installer.js
11/05/2013  05:59 PM             6,698 installer.tpl
06/11/2014  10:32 PM               525 installvars.db
06/12/2014  03:52 PM                 0 inventory.log
07/17/2012  01:28 AM             2,177 largeuploads.tpl
11/11/2013  09:58 PM            17,641 Live-3.0.1.tpl
06/11/2014  09:49 PM    <DIR>          logs
07/16/2012  09:47 PM               601 lostpassword email.tpl
07/17/2012  01:28 AM             2,920 lostpassword.tpl
11/04/2013  04:40 PM             9,216 main page html.tpl
07/20/2012  06:23 PM               517 main page template.tpl
11/03/2013  09:01 PM             3,618 main.css
09/22/2012  02:29 PM               448 maintenance.tpl
06/11/2014  09:45 PM            21,733 mastertemplate.tpl
11/02/2013  03:24 PM             3,141 mediaplayer.tpl
11/03/2013  08:59 PM             2,578 newaccount.css
07/04/2012  02:28 PM             1,736 newaccount.js
11/06/2013  07:03 PM             6,059 newaccount.tpl
05/05/2012  10:35 AM                24 not found redirect.tpl
10/27/2011  06:12 PM               185 not found.tpl
06/11/2014  10:19 PM    <DIR>          openssl-bin
10/02/2012  09:04 PM               288 overload.tpl
04/15/2012  12:09 AM               659 passwordcheck.tpl
12/11/2012  03:58 PM             4,414 passwordreset.tpl
06/11/2014  09:07 PM    <DIR>          php-bin
12/26/2012  03:05 PM            20,462 preferences.tpl
03/17/2012  11:11 PM               279 random.tpl
11/02/2013  10:50 PM               741 rebuildvfs.tpl
06/11/2014  09:07 PM    <DIR>          resources
11/02/2013  03:06 PM               508 resources.tpl
04/14/2012  10:21 PM                90 saveaccountkey.tpl
11/05/2013  08:41 PM               295 saveaccountsize.tpl
11/04/2013  08:49 PM             4,483 security.tpl
06/11/2014  09:07 PM    <DIR>          sendemail-bin
09/21/2013  10:04 AM         2,497,536 server.dll
11/04/2013  04:46 PM             8,348 serverstart.tpl
10/08/2012  03:04 PM               608 shared directory.tpl
07/20/2012  06:36 PM             1,343 shared-download.tpl
07/20/2012  06:29 PM             2,559 shared-results.tpl
10/24/2013  03:40 PM               912 sharefile email.tpl
07/17/2012  01:33 AM               848 signout-suggest.tpl
11/03/2013  07:37 PM             1,825 signout.tpl
06/28/2012  04:24 PM               358 sitemap.tpl
06/11/2014  09:37 PM             5,411 sslcertificate.crt
03/01/2013  03:34 PM               120 stop.bat
06/11/2014  10:32 PM    <DIR>          stunnel-bin
06/11/2014  10:21 PM    <DIR>          template
07/17/2012  01:33 AM               605 template.tpl
11/02/2013  03:50 PM             1,595 uploader.js
11/03/2013  08:58 PM            10,356 user template.css
11/04/2013  05:32 PM            36,181 user template.js
11/04/2013  04:48 PM            22,233 user template.tpl
11/05/2013  05:33 PM             5,673 user-file.tpl
11/03/2013  08:55 PM             5,573 user-folder.tpl
12/26/2012  10:08 PM             3,294 user-photo-gallery.tpl
06/11/2014  09:37 PM    <DIR>          users
07/16/2012  09:51 PM             1,065 validation email.tpl
07/06/2012  10:21 AM             1,390 validation.js
07/17/2012  01:33 AM             1,324 validation.tpl
07/21/2012  01:39 AM         4,216,840 vcredist_x86_2008.exe
07/21/2012  01:38 AM         4,995,416 vcredist_x86_2010.exe
12/31/2012  02:21 PM                 5 version.dat
12/31/2012  02:21 PM                 5 version.dat.bak
06/11/2014  09:45 PM    <DIR>          vfsroot
06/12/2014  03:44 PM    <DIR>          Webroot
03/19/2012  09:58 PM               235 whirlpoolhash.php
06/11/2014  09:07 PM    <DIR>          [DOCS]
01/13/2013  09:26 PM               126 [FHFS FORUM].url
01/13/2013  09:26 PM               125 [FHFS WIKI].url
             131 File(s)     15,253,467 bytes
              15 Dir(s)  134,424,879,104 bytes free

--

******
You will need to change the set/permision of this folder path:
*see pictures

Make sure you are the "folder's OWNER":

Right Mouse click > Properties > Security tab > Advance button
Advance security settings for fhfs > Owner tab > Edit button
Checkbox Replace owners on subcontiners and objects
click on your current windows user name (%user)
(in pictures i have scratched this out...)

apply and ok wait for setting to finish!

Apply your new folder permissions:

Right Mouse click > Properties > Security tab > Advance button
Advance security settings for fhfs > permissions tab >
In the drop down list you will need these users/groups and apply full control to them all

Uncheck the box "include inheritable permissions form the objects parent
*(IF asked click add the users/groups)
these groups need to be added:
System
Administrators
Users
these users need to be added:
(Your current user name)%user
Trustedinstaller
everyone
Creator Owner

----Now file permissions are good for program and user access!---
*****

In your case, before we launch fhfs!
in
C:\Program Files\FHFS

make a new folder and call it:
webbox

*(Now we are ready to begin and setup fhfs!)
there should be a file program in the fhfs folder called "FHFS_Launcher"
*see picture

this program may need to be "run as administrator"m it should be fine if you have set the permission earlier!

Click start FHFS
(*If you get any errors, fhfs is not started correctly and needs to be run as administrator or have your file paths rechecked!)

if successful you should have a prompt saying stunnel service successful installed
a hfs program would have launched and a webpage at:
http://127.0.0.1/~installer

will open for its main setup!

___
since you are changing the "users path"

see picture in previous post on this!
add
C:\Program Files\FHFS\webbox

to the webpage http://127.0.0.1/~installer saying: User File Folder

Fill out the rest of the page ( I recommend using the defaults with a newly created gmail account specific to this as there are help  information for google users!)
fill out the page and click the done/submit button...

Don't TOUCH A THING!) As it will be installing some apps to guarantee the usability such as:
visual C++ runtime 2008 and 2010 ... etc...

It may hang and hfs may aske to "reboot itself" click yes and after about 1-3-5 min... if the http://127.0.0.1/~installer
is still up, close the web browser!

(congratulation!, but that just the basic install now to specifically configure it!)

_____
Since so much has happen, reboot the computer!
-------

Setting up your specific setting!:
once you machine is on

Make sure your user/admin user is successfully setup!
open
C:\Program Files\FHFS\webbox\

dir of what it should look like:
---
06/11/2014  09:37 PM    <DIR>          .
06/11/2014  09:37 PM    <DIR>          ..
06/11/2014  09:37 PM    <DIR>          content-shared
06/11/2014  09:37 PM    <DIR>          content-thumbs
06/11/2014  09:37 PM    <DIR>          content-users
               0 File(s)              0 bytes
               5 Dir(s)  134,421,082,112 bytes free
------
Open "content-users" and you should see your admin user name
(IF not, start over and try again!):
As this is need to put your user accounts in that path!

***(Note, yes you have contorl over where the user files will be, but in hfs, the will still be at)
127.0.0.1\".%user
But we will be able to keep that there and readded the user name folder to
(hfs House (/) webbox / .%username... LATE!)
***

go to your path:
C:\Program Files\FHFS\
there should be a file program in the fhfs folder called "FHFS_Launcher" reopen it and click start!

Now we are ready to edit hfs!
--- see previous post:
Quote:
it is possible, but you will have to move quite a bit of stuff around..
As 'm still new to fhfs:
(i claim no responsibility after/ if you use these step as this may prevent fhfs form working properly...)

For starters in hfs
The house or ( / ) right click mouse > Properties > different template tab

--- this is the first web page code that launches many or scripts...----

to my understanding you want a "webpage before this and move that script down to "webbox"
*copy the text in here...

now/so go to:
C:\Program Files\FHFS
and make a new folder and call it webbox

add it to hfs as a real folder
The webbox folder>  right click mouse > Properties > different template tab
put your earlier copied  text in webbox.

go back to
The house or ( / ) right click mouse > Properties > different template tab
and change it to a html web code such as:
-----
</html>
<head></head>
<body>
<a href="http://192.168.1.1/webbox/">Visit Webbox</a>
</body>
</html>
------

now open your webpage
http://192.168.1.1/

you should be visited by a blank page with a link with words that say "visit Webbox"

clicking on that will bring you to the original page for fhfs....

To over you user accounts?
I don't recommend it, as they will be hidden web folders under the house and changing/moving them will most likely cause fhfs issues..

otherwise you will have to find the "real folder" path in hfs resources... and re add them to "webbox"....
(by right clicking the folder in hfs and click "edit resource" which allows you to change that folder/file and re add the file again as it is possible when hfs moves that your filename path change and may need to be re added!)

Good luck and have fun. :/

-----

I think this cover about all that was in this topic and should be of help to you.

i have a previous picture of a fhfs build with similar to what you are doing ad have a screen shot in a previous post!

i recommend to re-add the user accounts as they are created that way the scripts and programs behind scens are doing what they need to do, and you have your "windows side paths" set and can recreate the by readig them or by redirecting them...

Few :/ :)

Good Luck!
I'm only trying to help i mean no offense.
thank you for your time and patience,
Bmartino1

Offline raybob

  • Moderator
  • Tireless poster
  • *****
  • Posts: 453
    • View Profile
    • FileSplat.com
Re: way to change default URL root?
« Reply #10 on: July 02, 2014, 04:37:30 AM »
Wow.  I never thought anyone would put so much effort into FHFS  :D

Anyway, you COULD change the directory like that if you needed to but it would take a lot of programming changes.  I would just try to deal with the way it's written.

Follow members gave a thank to your post: