Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
04-13-2011, 01:31 AM
|
#16
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,215
|
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
|
|
|
04-13-2011, 04:41 AM
|
#17
|
Senior Member
Registered: Apr 2003
Posts: 3,695
Original Poster
Rep:
|
Quote:
Originally Posted by bathory
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
|
|
|
04-13-2011, 04:59 AM
|
#18
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,215
|
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
|
|
|
04-13-2011, 05:08 AM
|
#19
|
Senior Member
Registered: Apr 2003
Posts: 3,695
Original Poster
Rep:
|
Quote:
Originally Posted by bathory
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 05:10 AM.
|
|
|
04-13-2011, 05:25 AM
|
#20
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,215
|
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"
|
|
|
04-13-2011, 06:05 AM
|
#21
|
Senior Member
Registered: Apr 2003
Posts: 3,695
Original Poster
Rep:
|
Quote:
Originally Posted by bathory
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
|
|
|
04-13-2011, 06:30 AM
|
#22
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,215
|
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.
|
|
|
04-13-2011, 10:50 AM
|
#23
|
Senior Member
Registered: Apr 2003
Posts: 3,695
Original Poster
Rep:
|
Quote:
Originally Posted by bathory
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
|
|
|
04-13-2011, 05:40 PM
|
#24
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,215
|
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/
|
|
|
04-13-2011, 09:13 PM
|
#25
|
Senior Member
Registered: Apr 2003
Posts: 3,695
Original Poster
Rep:
|
Quote:
Originally Posted by bathory
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
|
|
|
04-14-2011, 01:20 AM
|
#26
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,215
|
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.
|
|
|
04-14-2011, 11:57 AM
|
#27
|
Senior Member
Registered: Apr 2003
Posts: 3,695
Original Poster
Rep:
|
Quote:
Originally Posted by bathory
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
|
|
|
All times are GMT -5. The time now is 12:48 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|