lighttpd - setup virtual hosting question
Hi folks,
host - ubuntu 1010 desktop 64bit virtualizer - Orcle VirtualBox VM (guest) - ubuntu 1010 server 64. Lighttpd is now running on the guest. On host browser evoking ip_address (intranet address) starts the webpage Then I 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 setup virtual hosting. All steps went through without complaint except the last step: $ sudo chown -R lighttpd:lighttpd /home/lighttpd/ [sudo] password for satimis: Code:
chown: invalid user: `lighttpd:lighttpd' Code:
chown: invalid user: `data-www:data-www' B.R. satimis |
Quote:
|
Quote:
I see. Sorry I made a mistake. I got it done. Why lighttpd:lighttpd didn't work? A further question where shall I keep "index.html" file? TIA B.R. satimis |
Quote:
Quote:
|
Quote:
Now I encounter another problem on connecting the public IP. On /etc/lighttpd/lighttpd.conf If Code:
server.port = 80 works without problem If Code:
server.port = 80 $ sudo /etc/init.d/lighttpd restart [sudo] password for satimis: Code:
* Stopping web server lighttpd [ OK ] $ lsof -i :80 No output. Any advice. TIA B.R. satimis |
You cannot make a server listen on an IP that is not present on your system. Public IP is the IP of your router, not your ubuntu box.
So leave the server.bind commented out, or use Quote:
Regards |
Quote:
server.bind = "public_IP" back to: server.bind = "local_IP" $ sudo /etc/init.d/lighttpd restart Code:
* Stopping web server lighttpd [ OK ] $ sudo cp /var/www/index.html /home/lighttpd/satimis.com/http/index.html $ sudo cp /var/www/index.html /home/lighttpd/default/http/index.html $ sudo rm /var/www/index.html On host's browser Code:
http://public_IP However I can't resolve it needs 2 "index.html" files. If deleting /home/lighttpd/default/http/index.html it can't work. B.R. satimis Edit: I must keep; /var/www/index.html Otherwise it can't work. Why it needs 3 identical files |
Quote:
You might try http://<some_testing_hostname>.satimis.com if you have DNS set up for your particular configuration. You can easily set one virtual host as default to get rid of extra index.html files. |
Hi dr_agon,
Thanks for your advice. Quote:
Whether you meant subdomain? I'll add them for testing later. What about other domain? e.g.aaa.com, bbb.com etc. Would the steps creating them the same? Thanks. Quote:
A side question: OS - Ubuntu 1010 server edition lighttpd won't start at boot. I must run Code:
# etc/init.d/lighttpd start Shall I add Code:
/etc/rc.d/init.d/lighttpd start B.R. satimis |
Quote:
Code:
update-rc.d lighttpd defaults |
Quote:
It didn't work. $ update-rc.d lighttpd defaults Code:
System start/stop links for /etc/init.d/lighttpd already exist. Code:
open(FILE, ">", "$archive/${script}.new") || die; http://forum.lighttpd.net/topic/277 B.R. satimis |
You should run the update-rc.d script as root, or at least use sudo.
Anyway in your case it's not needed as the symlinks already exist. I guess they were created when you installed the lighttpd package. Just check if the startup script is executable, because you said that lighttpd is not starting on boot: Code:
sudo chmod +x /etc/init.d/lighttpd |
Quote:
# update-rc.d lighttpd defaults Code:
System start/stop links for /etc/init.d/lighttpd already exist. No printout $ ls -al /etc/init.d/lighttpd Code:
-rwxr-xr-x 1 root root 2519 2010-07-16 02:25 /etc/init.d/lighttpd sudo nano /etc/rc.locat adding following line Code:
/etc/init.d/lighttpd start $ sudo /etc/init.d/lighttpd start Code:
[sudo] password for satimis: $ sudo tail /var/log/lighttpd/error.log Code:
2011-04-13 00:06:53: (server.c.954) WARNING: unknown config-key: accesslog.filename (ignored) |
I cannot tell what's wrong with the update-rc.d script. Check /var/log/messages to see if you find something relevant.
Other things you can do is: Remove the symlinks and recreate them: Code:
update-rc.d -f lighttpd remove Code:
/usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf Quote:
grep accesslog.filename /etc/lighttpd/lighttpd.conf |
Solved
Hi bathory,
$ sudo /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf Code:
2011-04-13 12:04:23: (configfile.c.1210) base-docroot doesn't exist: home/lighttpd/default/http/ Code:
index.html leave the server.bind blank without adding any line here. Now lighttpd starts at boot. Thanks for your assistance. B.R. satimis |
All times are GMT -5. The time now is 09:35 AM. |