SID-01325: How to install Twiki on an Apache shared hosting?
| Status: |
Answered |
TWiki version: |
5.1.0 |
Perl version: |
i don't know the exact version. |
| Category: |
CategoryInstallation |
Server OS: |
Linux |
Last update: |
14 years ago |
How to install Twiki on an Apache shared hosting? the provider offers only two directives for our users, one is htdocs and the other is cgi-bin. Can you give me some hints or suggeston on the issue? thanks in advance!
--
EthanLi - 2011-11-10
Discussion and Answer
- Unzip TWiki into a directory that is not htdocs and not cgi-bin
- Move the
twiki/bin to cgi-bin (rename dir OK, move all scripts to cgi-bin OK too)
- Move the
twiki/pub to htdocs
- Copy
ci-bin/bin/LocalLib.cfg.txt to LocalLib.cfg and fix the $twikiLibPath to point to your twiki/lib using absolute path
- Make sure dirs and files are owned by the webserver user
- Run configure and fix all dirs to reflect the non-standard directory structure
--
PeterThoeny - 2011-11-10
thanks for your help!
--
EthanLi - 2011-11-11
but where other folders should be placed? like /template, in addition, whether i need to create a .htaccess file in root directory and then copy the content of httds.conf.txt to .htaccess, you know, i have tried several times but all my effort went for naught. could you go into details about the installation? looking forward to your response. thanks very much!
--
EthanLi - 2011-11-11
Leave twiki/templates and other sub dirs in the twiki directory. Example:
-
/var/www/vhosts/example.com/cgi-bin/twiki - twiki bin
-
/var/www/vhosts/example.com/httpdocs/pub - twiki pub
-
/var/www/vhosts/example.com/twiki - twiki with all other sub-dirs like templates, tools, lib etc.
Also, in this scenario you do not need any httpd.conf or .htaccess changes because your cgi-bin and httpdocs are already enabled properly.
--
PeterThoeny - 2011-11-11
I really appreciate all your hard work and prompt response in resolving my problem. I contacted the hosting provider, Perl is only available via the cgi-bin directory.
As with any script, users should start the script withthe appropriate #! line. In the case of perl:
#!/usr/bin/perl/
And the script must return MIME type data as their first line of output. Last day you told me placed Perl scripts(twiki/bin) to htdocs, I didn't think it could work. As a general rule, cgi-bin directory of Apache is used to serve and run scripts, and static contents should be put to /htdocs. It is very kind of you to try to help me out, if you have some free time, could you lend me a hand to address my installation problem? thanks a bunch!!!
--
EthanLi - 2011-11-11
No, please re-read my response. The twiki/bin needs to go into your cgi-bin.
--
PeterThoeny - 2011-11-11
sorry for my carelessness. wish you happy and healthy every day, furthermore, hopes twiki become more and more popular.
--
EthanLi - 2011-11-12
When I am on the verge of success in installation, unfortunately I was prompted it failed with the following error message:
mkdir NOT SET: Permission denied at /home/project-web/career/cgi-bin/lib/CPAN/lib//CGI/Session/Driver/file.pm line 34
Apparently, there is a double slash between lib and CGI, which made the program can't find the desired file, right? How to fix this problem? I would be very gratefue if you could give me some advice.
--
EthanLi - 2011-11-12
Double-slashes are OK on Linux. The error is most likely caused by incorrect file-ownership. Make sure all files and sub-dirs below
twiki/working are owned by the webserver user.
--
PeterThoeny - 2011-11-12
Thanks Peter, if I want to set the directory and all the files inside owned by the webserver users, I just need to set permissions or change mode, entitles everyone to read and write and execute the files. right? I'm really appreciative of your efforts.
--
EthanLi - 2011-11-13
Well, you can set it to all read-write and it will work, but for security reasons it is better to set the ownership of the files and directories to the webserver user. You might not have the right to do so on a shared account, but if you can ask the provider to do that.
--
PeterThoeny - 2011-11-13
Thanks for your precious time.
--
EthanLi - 2011-11-13
"The file is owned by webserver user", means everyone even not a group member can write the file? Or i just need to change the mode to be group-writable. you know, I have already authorized permissions to group member, but error still occurred. According to my provider, the write bit for "everyone" is always off, and may not be turned on. I am at my wit's end. Any advice will be appreciated.
--
EthanLi - 2011-11-14
The provider also told me if I wish to control access by the webserver user, I simply need to change the "group" permissions bit. The reason that it doesn't work may be /htdocs and other newly created directory are not writable, I should put all the directories and files to /cgi-bin.
--
EthanLi - 2011-11-14
This is more a Linux question than a TWiki question. Find out what the webserver user is and to what group(s) the webserver user belongs to. Either change the ownership of all dirs and files below twiki/data, twiki/pub and twiki/working to be owned by the webserver user, or set it to be writable by the group shared with your login and and web webserver user.
--
PeterThoeny - 2011-11-15
Thanks Peter, Now I encounter another question, when I tried to load the view page, it found no page matched my request. and in the browser address bar, it showed:
"http://rise.biznot%20setnot%20set/oops/Main/WebHome?template=oopsaccessdenied;def=no_such_web;param1=view;template=oopsaccessdenied;def=no_such_web;param1=view" .
rise.biz is my domain name.
Much appreciated!
--
EthanLi - 2011-11-15
It looks like {ScriptUrlPath} and possible other settings are not set properly. Follow the installations instructions and run configure.
--
PeterThoeny - 2011-11-15
Thanks Peter! I wonder how to create the specific pages like support, about, community and so on. You know, the default front page appears on www.yourdomain.com/cgi-bin/bin/view , I want to create www.yourdomain.com/support and still use its original css file, Thank you very much!
--
EthanLi - 2011-11-20
Add an apache rewrite rule that accesses, say a /do/view/Support/WebHome page on your domain when people access www.yourdomain.com/support. See
http://httpd.apache.org/docs/current/mod/mod_rewrite.html
--
PeterThoeny - 2011-11-20
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.