WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How do you set up a webserver?  (Read 15126 times)

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
How do you set up a webserver?
« on: February 10, 2011, 03:43:19 AM »
I install, in order:
cherokee
python
php5
fcgi

I run cheroke admin, open localhost:9090 and insert admin e password (automatically generated), but I can't go beyond.
What should I do now?

Offline combo3

  • Full Member
  • ***
  • Posts: 148
Re: How do you set up a webserver?
« Reply #1 on: February 11, 2011, 05:12:00 AM »
What specifically do you need help with?

If you are having problems with the admin interface, it's probably because the default config file is read-only. In order to make it writable, enter the following:

Code: [Select]
cd /usr/local/etc/cherokee
sudo mv cherokee.conf cherokee.conf.bak
sudo cp cherokee.conf.bak cherokee.conf

The default web page is /var/www/index.html -- replace it with your own.


For detailed help see Cherokee Documentation (or install cherokee-doc.tcz and open /local/share/doc/cherokee/index.html in your browser)

For detailed instructions on creating web pages see Web Tutorials

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: How do you set up a webserver?
« Reply #2 on: February 11, 2011, 01:30:05 PM »
Ok, now work.

1 I installed the packages I said before
2 I changed the ownership of the file  /usr/local/etc/cherokee/cherokee.conf in:
read, write and exec for user group and other; owner tc group staff
3 i run cherokee-admin and start the server.

Now, is ok but php don't work,  I tried a version of dokuwiki and the install.php page instead start of asking me to download.
Ok, i follow this guide: http://www.cherokee-project.com/doc/cookbook_php.html

1 access to the top menu voice "vservers", in tab "behavior"
2 clic on button "rule management"
3 clic on upper button "new" --> "languages" --> "php" and "add"

This not resolve the situation.
If I reboot cherokee-admin configurations returned as they were before.
It seems that this web interface is not able to edit the file /usr/local/etc/cherokee/cherokee.conf, in fact, to change the "default WWW" I had to edit the configuration file by hand becausethrough  the browser  did not succeed.

But I'm not able to add support php in text mode.
What should I do?

Offline combo3

  • Full Member
  • ***
  • Posts: 148
Re: How do you set up a webserver?
« Reply #3 on: February 11, 2011, 07:36:51 PM »
Did you remember to save your config files before restarting?

In any case, here are the exact steps I followed to successfully install Drupal


Install Drupal

1. Download the latest version of Drupal (currently 7.0)
 
   - http://ftp.drupal.org/files/projects/drupal-7.0.tar.gz

2. Create a web directory (Note: all examples use hda1. Change this to suit your situation)

Code: [Select]
sudo mkdir /mnt/hda1/www
3. Unpack the tarball

Code: [Select]
sudo tar -xf drupal-7.0.tar.gz -C /mnt/hda1/www
4. Change ownership of the Drupal directory

Code: [Select]
cd /mnt/hda1/www
sudo chown tc.staff -R drupal-7.0

5. Create /mnt/hda1/www/drupal-7.0/sites/default/settings.php

Code: [Select]
cd drupal-7.0/sites/default
cp default.settings.php settings.php


Get your lan IP address:

Code: [Select]
ifconfig
For the purposes of this example I'll assume it's 192.168.1.100


Configure Cherokee

1. Start the Cherokee admin interface

Code: [Select]
sudo cherokee-admin
2. Open a web browser and enter 127.0.0.1:9090 in the address bar

3. Log on using the credentials supplied in the terminal

4. Select: vServers

5. Select: [New] > CMS > Drupal > [Add] [Next]

6. Drupal Local directory: /mnt/hda1/www/drupal-7.0/  [Next]

7. New Host Name: www.cms.lan [Create]

8. Under Host Match
 
 - Method: Server IP [Add New]
 - New IP/Subnet: 127.0.0.1 [Add] [Add New]
 - New IP/Subnet: 192.168.1.100 [Add]     << Change this to your lan IP address
 
9. Select: Save [Graceful Restart]


Important Housekeeping

1. Add the Host Name to /etc/hosts

Code: [Select]
echo 127.0.0.1 www.cms.lan cms.lan | sudo tee >> /etc/hosts
2. Backup /etc/hosts and cherokee.config

Code: [Select]
echo etc/hosts >> /opt/.filetool.lst
echo usr/local/etc/cherokee/cherokee.conf >> /opt/.filetool.lst
filetool.sh -b


Set Up Drupal

1. In your browser address bar enter: www.cms.lan
2. Follow the on-screen instructions to complete the setup.
3. Start adding content.

{As an aside, these instructions took longer to write out than the actual installation  ;D}
« Last Edit: February 11, 2011, 07:41:31 PM by combo3 »

Offline combo3

  • Full Member
  • ***
  • Posts: 148
Re: How do you set up a webserver?
« Reply #4 on: February 13, 2011, 03:08:23 PM »
After posting, I realized that my instructions didn't properly address your specific questions, so here are the steps to install DokuWiki on the Cherokee server:


Download and Install DokuWiki  (per DokuWiki Installation Instructions)

1. Download the latest stable release of DokuWiki (currently 2010-11-07a)
 
2. Create a web directory (Note: all examples use hda1. Change this to suit your situation)

Code: [Select]
sudo mkdir /mnt/hda1/www
3. Unpack the tarball

Code: [Select]
sudo tar -xf dokuwiki-2010-11-07a.tgz -C /mnt/hda1/www
4. Change ownership of the DokuWiki directory

Code: [Select]
sudo chown -R tc.staff /mnt/hda1/www/dokuwiki-2010-11-07a/

Configure Cherokee

1. Create the Cherokee log files and set permissions

Code: [Select]
cd /var/log
sudo touch cherokee.access cherokee.error
sudo chown tc.staff cherokee.*

2. Start the Cherokee admin interface

Code: [Select]
sudo cherokee-admin
3. Open a web browser and enter 127.0.0.1:9090 in the address bar

4. Log on using the credentials supplied in the terminal

 - If the server is running click on [Stop Server]


5. Select: General

   a) Select: Network

      IPv6 - Uncheck Enabled

    b) Select: Permissions

      User: tc
      Group: staff


6. Select: vServers

    a) Select: Basics

        Document Root: /mnt/hda1/www/dokuwiki-2010-11-07a

        Directory Indexes: index.html, index.php

    b) Select: Behavior [Rule Management] [New]

        Select: Languages > PHP [Add] [Create]

        Click: [Non Final] in Extensions php box to change it to final
 
7. Select: Save [Ok]

8. Select: Home [Start Server]


Important Housekeeping

Add config files to /opt/.filetool.lst and run a backup

Code: [Select]
echo usr/local/etc/cherokee/cherokee.conf >> /opt/.filetool.lst
echo var/log/cherokee.access >> /opt/.filetool.lst
echo var/log/cherokee.error >> /opt/.filetool.lst
filetool.sh -b


Set Up DokuWiki

1. In your browser address bar enter: localhost/install.php
2. Follow the on-screen instructions to complete the setup.

Important: If you plan on running your wiki with public access over the internet, please note the warning box (lower right) stating that your data directory is NOT properly secured and follow the instructions given in the link.

Once setup is complete, you can access the wiki by entering localhost in the address bar.

If you want your server to start automagically on system boot, add the following stanza to /opt/bootlocal.sh

Code: [Select]
echo /usr/local/etc/init.d/cherokee start >> /opt/bootlocal.sh

{Edit: Amended to include missing instructions.}
« Last Edit: February 15, 2011, 10:24:15 AM by combo3 »

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: How do you set up a webserver?
« Reply #5 on: February 14, 2011, 12:43:46 AM »
Ok, thanks a lot, your guide is really perfect in every detail.
I'm sorry for giving us so long to respond but I had to do these days.

My real problem was trivial, I could not find the button "save"and then I thought did not exist (but I tried).
The fact is that the color of the botton is blue on blue and it out off the page because i use zoom.

It still remains indispensable for driving me all the rest (restore the webserver is essential), and then renew the thanks:)

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: How do you set up a webserver?
« Reply #6 on: February 15, 2011, 02:52:09 AM »
Back in the trenches, I have a problem with cherokee.
The web server works but it seems that each folder was created by it as root owner.
This means that any directory or file created when editing the wiki is not modificable, even the configuration file returns require administrator privileges to be changed.

I can change the operation of Cherokee in user environment?

Offline combo3

  • Full Member
  • ***
  • Posts: 148
Re: How do you set up a webserver?
« Reply #7 on: February 15, 2011, 10:23:19 AM »
My bad;  I forgot a few steps. (see my amended Reply #4 - steps 1 & 5 under Configure Cherokee)

The following steps should fix the problem

- Log on with the cherokee-admin console

- Stop the server

- Select: General

   a) Select: Network

      IPv6 - Uncheck Enabled

   b) Select: Permissions

      User: tc
      Group: staff

- Select: Save [OK]

- Reset the permissions of the dokuwiki directory

Code: [Select]
sudo chown -R tc.staff /mnt/hda1/www/dokuwiki-2010-11-07a
... and the log files

Code: [Select]
cd /var/log
sudo touch cherokee.access cherokee.error
sudo chown tc.staff cherokee.*


- Add the log files to /opt/.filetool.lst and run a backup

Code: [Select]
echo var/log/cherokee.access >> /opt/.filetool.lst
echo var/log/cherokee.error >> /opt/.filetool.lst
filetool.sh -b

- Restart the server.
« Last Edit: February 15, 2011, 10:33:10 AM by combo3 »

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: How do you set up a webserver?
« Reply #8 on: February 15, 2011, 10:21:55 PM »
Ok, works now, (I have not tried to reboot), but I still have one outstanding issue.
The plugin system or the installation scripts need to be able to uncompress files (zip, tgz, bz2 ...) but I can not.

Offline combo3

  • Full Member
  • ***
  • Posts: 148
Re: How do you set up a webserver?
« Reply #9 on: February 16, 2011, 12:01:29 PM »
Not sure why the script is failing to extract the archive.


Perhaps you might have better luck getting an answer to your problem by posting a comment in the dokuwiki forums, here or contacting the author directly.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: How do you set up a webserver?
« Reply #10 on: February 16, 2011, 01:06:09 PM »
I do not think it is a dokuwiki problem, with xampp (and BitNami) worked quietly, I think there is some function of compression at level of webserver to activate.
I try to search in the documentation of Cherokee (although I do not know what to look for)

I find this and allow deflate and gzip for all Behavior Rules, but still does not decompress.
I look better, maybe even in the Cherokee forum.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: How do you set up a webserver?
« Reply #11 on: February 16, 2011, 05:56:43 PM »
After some research I discovered it could be a problem with php.
This is my phpinfo http://pastehtml.com/view/1d9lfn8.html , in phar section gzip is disablet, i prove to install gzip tar pigz.tcz but i dont have any success.
I found this in the forum http://forum.tinycorelinux.net/index.php?topic=8295.0 , perhaps it is related.

Offline combo3

  • Full Member
  • ***
  • Posts: 148
Re: How do you set up a webserver?
« Reply #12 on: February 16, 2011, 09:42:31 PM »
You're right; it does appear to be due to lack of gzip support in PHP.

Just out of curiosity, is there a particular reason you need to install dokuwiki this way?

You could probably achieve the same result with a shell script using wget and tar.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: How do you set up a webserver?
« Reply #13 on: February 28, 2011, 02:58:06 PM »
I'm sorry if I have not responded, but I realized only now that gmail had put notify of the forum to spam, I removed them now.
The reason is that I want a platform that works on all aspects.
However, this feature makes it much easier to manage plugin dokuwiki.