LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-13-2011, 12:31 AM   #16
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032

Quote:
2011-04-13 12:04:23: (configfile.c.1210) base-docroot doesn't exist: home/lighttpd/default/http/
2011-04-13 12:04:23: (server.c.613) setting default values failed
You miss the leading "/" in the docroot, so the server is looking for the docroot in /etc/lighttpd/lighttpd/home/lighttpd/default/http. So edit lighttpd.conf and use
Code:
server.document-root /home/lighttpd/default/http
 
Old 04-13-2011, 03:41 AM   #17
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by bathory View Post
You miss the leading "/" in the docroot, so the server is looking for the docroot in /etc/lighttpd/lighttpd/home/lighttpd/default/http. So edit lighttpd.conf and use
Code:
server.document-root /home/lighttpd/default/http
I see. Thanks. I got it changed.

However "server-bind" must bind all interfaces as default. Otherwise lighttpd won't start at boot automatically.

B.R.
satimis
 
Old 04-13-2011, 03:59 AM   #18
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
However "server-bind" must bind all interfaces as default. Otherwise lighttpd won't start at boot automatically.
Are you sure that using
Code:
server.bind = "x.x.x.x"
(where x.x.x.x is your internal IP) is the problem? And if it was the problem, why lighttpd was starting using /etc/init.d/lighttpd start?

Anyway if you think your question is answered, you can mark the thread "Solved" from "Thread Tools"

Regards
 
Old 04-13-2011, 04:08 AM   #19
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by bathory View Post
Are you sure that using
Code:
server.bind = "x.x.x.x"
(where x.x.x.x is your internal IP) is the problem? And if it was the problem, why lighttpd was starting using /etc/init.d/lighttpd start?
No I can't add;
Code:
server.bind = "x.x.x.x"
internal IP/Intranet_IP there.

Otherwise lighttpd won't start at boot even with
Code:
/etc/init.d/lighttpd start

OR
sh /etc/init.d/lighttpd start
added on /etc/rc.local. I don't know why? Once deleted and rebooted lighttpd started at boot. I can browse the webpage on browser (host's or other VM's) running "domain.com" or public_IP

satimis

Last edited by satimis; 04-13-2011 at 04:10 AM.
 
Old 04-13-2011, 04:25 AM   #20
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
If it doesn't start, it should log an error.
What happens if you use the local loopback ip:
Code:
server.bind = "127.0.0.1"
 
Old 04-13-2011, 05:05 AM   #21
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by bathory View Post
If it doesn't start, it should log an error.
What happens if you use the local loopback ip:
Code:
server.bind = "127.0.0.1"
No. It also can't work

satimis
 
Old 04-13-2011, 05:30 AM   #22
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
So, what's in the logs?
I guess you've somehow borked the config file. Because you had also that error about the accesslog.filename, that is a legitimate option.
 
Old 04-13-2011, 09:50 AM   #23
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by bathory View Post
So, what's in the logs?
I guess you've somehow borked the config file. Because you had also that error about the accesslog.filename, that is a legitimate option.
$ sudo tail /var/log/lighttpd/error.log
Code:
2011-04-13 18:01:52: (server.c.954) WARNING: unknown config-key: accesslog.filename (ignored) 
2011-04-13 18:03:43: (server.c.1503) server stopped by UID = 0 PID = 1219 
2011-04-13 18:05:08: (log.c.166) server started 
2011-04-13 18:05:08: (server.c.954) WARNING: unknown config-key: accesslog.filename (ignored) 
2011-04-13 18:10:38: (server.c.1503) server stopped by UID = 0 PID = 1197 
2011-04-13 18:12:11: (log.c.166) server started 
2011-04-13 18:12:11: (server.c.954) WARNING: unknown config-key: accesslog.filename (ignored) 
2011-04-13 22:25:09: (log.c.166) server started 
2011-04-13 22:25:09: (server.c.954) WARNING: unknown config-key: accesslog.filename (ignored) 
2011-04-13 22:27:30: (server.c.1503) server stopped by UID = 0 PID = 1242
$ sudo updatedb
$ locate accesslog
Code:
/etc/lighttpd/conf-available/10-accesslog.conf
/usr/lib/lighttpd/mod_accesslog.so
$ locate accesslog*
$ locate accesslog.*
$ sudo find / -name accesslog*
$ sudo find / -name accesslog.*
All without printout

$ cat /etc/lighttpd/conf-available/10-accesslog.conf
Code:
 
server.modules += ( "mod_accesslog" )

accesslog.filename = "/var/log/lighttpd/access.log"

The filename is access.log


$ sudo ls /var/log/lighttpd/ grep access.log
Code:
ls: cannot access grep: No such file or directory
ls: cannot access access.log: No such file or directory
/var/log/lighttpd/:
error.log
What shall I do?

Rename:
Code:
accesslog.filename = "/var/log/lighttpd/access.log"
as:
Code:
accesslog.filename = "/var/log/lighttpd/error.log"
?

TIA

satimis
 
Old 04-13-2011, 04:40 PM   #24
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
$ cat /etc/lighttpd/conf-available/10-accesslog.conf
server.modules += ( "mod_accesslog" )

accesslog.filename = "/var/log/lighttpd/access.log"
If lighttpd works in ubuntu just like as apache does, you need to create a symlink to conf-enabled:
Code:
ln -s /etc/lighttpd/conf-available/10-accesslog.conf /etc/lighttpd/conf-enabled/
 
Old 04-13-2011, 08:13 PM   #25
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by bathory View Post
If lighttpd works in ubuntu just like as apache does, you need to create a symlink to conf-enabled:
Code:
ln -s /etc/lighttpd/conf-available/10-accesslog.conf /etc/lighttpd/conf-enabled/
Performed following steps:-

$ sudo ln -s /etc/lighttpd/conf-available/10-accesslog.conf /etc/lighttpd/conf-enabled/

$ ls -al /etc/lighttpd/conf-enabled/
Code:
total 8
drwxr-xr-x 2 root root 4096 2011-04-14 09:00 .
drwxr-xr-x 4 root root 4096 2011-04-13 23:17 ..
lrwxrwxrwx 1 root root   46 2011-04-14 09:00 10-accesslog.conf -> /etc/lighttpd/conf-available/10-accesslog.conf
lrwxrwxrwx 1 root root   44 2011-04-09 14:49 10-fastcgi.conf -> /etc/lighttpd/conf-available/10-fastcgi.conf
lrwxrwxrwx 1 root root   48 2011-04-09 14:49 15-fastcgi-php.conf -> /etc/lighttpd/conf-available/15-fastcgi-php.conf
$ sudo nano /etc/lighttpd/lighttpd.conf
adding;
server-bind = "local_ip"

$ sudo /etc/init.d/lighttpd restart
Code:
 * Stopping web server lighttpd                                          [ OK ] 
Syntax OK
 * Starting web server lighttpd                                          [ OK ]
Still fail. lighttpd won't start at boot

$ sudo tail /var/log/lighttpd/error.log
Code:
2011-04-14 00:54:36: (log.c.166) server started 
2011-04-14 00:54:36: (server.c.954) WARNING: unknown config-key: accesslog.filename (ignored) 
2011-04-14 00:54:36: (server.c.954) WARNING: unknown config-key: accesslog.filename (ignored) 
2011-04-14 08:57:13: (log.c.166) server started 
2011-04-14 08:57:13: (server.c.954) WARNING: unknown config-key: accesslog.filename (ignored) 
2011-04-14 08:57:13: (server.c.954) WARNING: unknown config-key: accesslog.filename (ignored) 
2011-04-14 09:02:14: (server.c.1503) server stopped by UID = 0 PID = 1297 
2011-04-14 09:02:14: (log.c.166) server started 
2011-04-14 09:02:14: (log.c.118) opening errorlog '/home/lighttpd/aaa.satimis.com/logs/access.log' failed: Permission denied
2011-04-14 09:02:14: (server.c.931) Configuration of plugins failed. Going down.
satimis
 
Old 04-14-2011, 12:20 AM   #26
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
2011-04-14 09:02:14: (log.c.118) opening errorlog '/home/lighttpd/aaa.satimis.com/logs/access.log' failed: Permission denied
Now it's a permission issue. If you want the logs in that directory, make sure it's owned by user/group www-data:www-data

For the problem with the listening IP, I can only guess that by the time lighttpd starts on boot, your VM doesn't have acquired an IP yet.
 
Old 04-14-2011, 10:57 AM   #27
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by bathory View Post
Now it's a permission issue. If you want the logs in that directory, make sure it's owned by user/group www-data:www-data

For the problem with the listening IP, I can only guess that by the time lighttpd starts on boot, your VM doesn't have acquired an IP yet.
Hi bathory,

I was in complete mess. Because I followed;

Installing Lighttpd With PHP5 And MySQL Support On Ubuntu 10.10
http://www.howtoforge.com/installing...n-ubuntu-10.10

to install lighttpd and then followed;
Lighttpd virtualhost configuration ~ name-based virtual hosting
How do I configure Lighttpd for name-based virtual hosting?
http://www.cyberciti.biz/faq/howto-l...configuration/

to configure vhost.

I should follow;

Installing and configuring lighttpd webserver – HOWTO
http://www.cyberciti.biz/tips/instal...ver-howto.html

instead. The configuration is completely different.

I'll try to rectify the mistakes, if possible. Otherwise I'll start again installing the lighttpd webserver. Still I will run Ubuntu 1010 server (64bit) as OS installing lighttpd with aptitude NOT downloading the package from Internet.

I'll come back after trying to rectify the mistake, if possible.

B.R.
satimis
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual domain hosting with dns setup cool47 Linux - Networking 5 01-18-2010 01:16 PM
Question About Virtual Hosting scotty5000 Linux - Server 2 08-03-2009 08:24 AM
Virtual Hosting Setup. Markness Linux - Software 13 05-04-2006 02:36 AM
Virtual hosting question idot Linux - Software 4 08-08-2005 02:28 PM
Virtual hosting/ domain question Kovacs Linux - Networking 2 11-23-2004 05:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration