New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Adding my own wiki to webserver on B3

Got problems with your B2 or B3? Share and get helped!
spaceuser
Posts: 40
Joined: 28 Jul 2011, 02:29

Adding my own wiki to webserver on B3

Post by spaceuser »

Hi!

Have a B3 server since a few months back. Like to move my current wiki on another server to B3. I'm using Dokuwiki, since it have no need for any database. All data is saved in files only. Normally I'm used to store web applications under /var/www, but on B3 it seems very different.

I have problems to find where to put it, to be accessed from web interface. I read in forum that /home/web should be the place for a web application. I tried to put a folder at /home/web/<folder> and a index.html file in that folder, but it can't be reached. I have set the owner to root and group to www-data, and permissions to 777. I still like to have the default web, and later maybe add the start page with an icon for my wiki. Any suggestions on what I should do, would be appreciated.

TIA
pcrene
Posts: 305
Joined: 17 May 2008, 15:49

Re: Adding my own wiki to webserver on B3

Post by pcrene »

Hello

Try: //home/web

Rene
B3 1T + B-Stor 2T, B2 1T as backup
40 users active....
Opensat4all.Com
spaceuser
Posts: 40
Joined: 28 Jul 2011, 02:29

Re: Adding my own wiki to webserver on B3

Post by spaceuser »

Try: //home/web
Hmm... that I don't understand. Can you please clarify a bit more?
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: Adding my own wiki to webserver on B3

Post by Cheeseboy »

Hi,

Just create a sub-directory under /home/web and then access it by using the path in the URL.
Simple example:

Code: Select all

xyz@b3:~$ mkdir ../web/testapp
xyz@b3:~$ echo '<HTML><BODY>testmonkey</BODY></HTML>' > ../web/testapp/index.html
Then in your browser:
http://b3/testapp/index.html

Of course, you would want to copy your web-app into the sub-directory rather than echoing some nonsense like above.

This should be sufficient for testing purposes.
When everything is up as you want it, you can start looking into multiple domains etc. in Apache.

Best regards,

Cheeseboy
spaceuser
Posts: 40
Joined: 28 Jul 2011, 02:29

Re: Adding my own wiki to webserver on B3

Post by spaceuser »

xyz@b3:~$ mkdir ../web/testapp
xyz@b3:~$ echo '<HTML><BODY>testmonkey</BODY></HTML>' > ../web/testapp/index.html
This is exactly what I have done, and it seem not to work. Therefore I thought I need to do some more to make it work.

In the beginning, I will remeber that I only need to surf to http://<mydomain>/ and it showed, "Redirecting ..." to reaching the b3 main page. That does not happend any more. I receive a 403 page, "You don't have permission to access /index.html on this server." because I can't even reach the index.html file at /home/web. Now I need to surf to http://<mydomain>/admin/ to be able to login. This, guess is also, that is causing the problem to surf to my wiki folder below, at /home/web/wiki/ and reach the index.html file.

A ls -l /home command, showes:

drwxrwsr-x 3 root www-data 4096 Sep 19 09:27 web

I tried to change to:

drwxrwsr-x 3 root users 4096 Sep 19 09:27 web

With no luck.

A restart of the webserver gives the following message:

root@b3:/home/lars# /etc/init.d/apache2 restart
Restarting web server: apache2apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.10.1 for ServerName
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.10.1 for ServerName

I don't know if that have any to do with the problems.

I can reach b3 main page from local LAN using, http://192.168.10.1/admin/ or http://<mydomain>/admin/. The last one, from home as well as from outside LAN. The http://b3.local did work in the beginning when I bought it, but now it don't. But http://b3/admin/ work.

Edit:
I think the "Redirection ..." page access problem above began after I tried the "Server only" profile (using a separate router/firewall (conecting b3 WAN port to a LAN port of my separate router/firewall), and after that I was going back to the "Router + Firewall + Server" profile, removing my old Linksys router/firewall connecting the b3 WAN port to internet as in the first place.

Any suggestions on what to check would be appreciated.
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: Adding my own wiki to webserver on B3

Post by Cheeseboy »

Make sure that your actual host name is in the /etc/hosts file.
There was another user with this missing the other day.
Perhaps a flaw in the newest release or something?

Example:

Code: Select all

xyz@b3:~$ grep `hostname` /etc/hosts
192.168.10.1	b3.localdomain	b3
Note that those aren't quotes but "funny quotes" found between your ESC and your TAB keys if you have a UK keyboard.
Copy/paste will do it.

Or just list the whole thing:

Code: Select all

cat /etc/hosts
Best regards,

Cheeseboy
spaceuser
Posts: 40
Joined: 28 Jul 2011, 02:29

Re: Adding my own wiki to webserver on B3

Post by spaceuser »

The /etc/hosts shows:

192.168.10.1 b3 b3.localdomain

But I changed it to:

192.168.10.1 b3.localdomain b3

Restarted the webserver, but it didn't change anything. BTW, I use swedish keyboard settings.
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: Adding my own wiki to webserver on B3

Post by Cheeseboy »

Then I don't know. Google suggested missing hosts entry...

Sent from my HTC Desire using Tapatalk
spaceuser
Posts: 40
Joined: 28 Jul 2011, 02:29

Re: Adding my own wiki to webserver on B3

Post by spaceuser »

Okey, thanx for your effort to help anyway.
johannes
Posts: 1470
Joined: 31 Dec 2006, 07:12
Location: Sweden
Contact:

Re: Adding my own wiki to webserver on B3

Post by johannes »

It sounds like you don't have your /home/web/index.html left? This is the file that did the "Redirecting..." thing before.

Perhaps you exchanged that file against your own, and forgot to set the correct permissions to the new one? (Must be readable to the web server etc..).
/Johannes (Excito co-founder a long time ago, but now I'm just Johannes)
spaceuser
Posts: 40
Joined: 28 Jul 2011, 02:29

Re: Adding my own wiki to webserver on B3

Post by spaceuser »

It sounds like you don't have your /home/web/index.html left? This is the file that did the "Redirecting..." thing before.

Perhaps you exchanged that file against your own, and forgot to set the correct permissions to the new one? (Must be readable to the web server etc..).
No no... the original file is still there, and I haven't change anything to the apache config either. So you can be sure that I find all this strange. As I said above. The only thing that I could find starting all this, was when I tried the "Server only" profile, and later after that I was going back to the "Router + Firewall + Server" profile.
spaceuser
Posts: 40
Joined: 28 Jul 2011, 02:29

Re: Adding my own wiki to webserver on B3

Post by spaceuser »

I have checked the /var/log/apache2/error.log when I tried to access my index.html file at /home/web/dokuwiki/ and it says:

Code: Select all

[Tue Sep 20 12:46:21 2011] [notice] FastCGI: process manager initialized (pid 9142)
[Tue Sep 20 12:46:23 2011] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Sep 20 12:46:23 2011] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Tue Sep 20 12:46:23 2011] [notice] Apache/2.2.16 (Debian) mod_fastcgi/2.4.6 PHP/5.3.2-1ex1 with Suhosin-Patch mod_ssl/2.2.16 OpenSSL/0.9.8o configured -- resuming normal operations
[Tue Sep 20 12:46:38 2011] [error] [client xx.xx.xx.227] (13)Permission denied: access to /dokuwiki/index.html denied
[Tue Sep 20 12:46:50 2011] [error] [client xx.xx.xx.227] (13)Permission denied: access to /dokuwiki/index.html denied
Anything strange?
johannes
Posts: 1470
Joined: 31 Dec 2006, 07:12
Location: Sweden
Contact:

Re: Adding my own wiki to webserver on B3

Post by johannes »

Yes, the permissions seem wrong in your /dokuwiki/index.html? Can you do ls -l on that file and share?
/Johannes (Excito co-founder a long time ago, but now I'm just Johannes)
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: Adding my own wiki to webserver on B3

Post by Cheeseboy »

Please try to make the ownership correct first (as root):

Code: Select all

chown -R www-data:users /home/web/dokuwiki
EDIT:
Missed Johannes' reply...
spaceuser
Posts: 40
Joined: 28 Jul 2011, 02:29

Re: Adding my own wiki to webserver on B3

Post by spaceuser »

Yes, the permissions seem wrong in your /dokuwiki/index.html? Can you do ls -l on that file and share?
-rwxrwxrwx 1 root www-data 174 Sep 19 09:09 index.html
chown -R www-data:users /home/web/dokuwiki
Just tried that and restarted apache as well, but still receive a 403 page.
Post Reply