Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2005
    Posts
    359

    Secure lighttpd install

    Hello guys,
    Could you give me a hint?

    Ive installed lighttpd along with cpanel/apache, but running on port 81.

    What I need to do is this:

    domain.com - running on apache.
    imgs.domain.com:81 - running on lighttpd.

    Im setting imgs.domain.com to this path: /home/domain/public_html/imgs/

    Ok, no problems.

    But I dont want to run lighttpd as root user. I know that is it possible to run as chrooted user, but how can I do that in a simple way?

  2. #2
    Join Date
    Dec 2004
    Location
    New York, NY
    Posts
    10,574
    ... specify the user and group in the lighttpd config file?

  3. #3
    Join Date
    Mar 2005
    Posts
    359
    Quote Originally Posted by layer0
    ... specify the user and group in the lighttpd config file?
    If I create a user/group lighttpd, and specify on the config the webserver still access domain.com files, running as domain.domain?

  4. #4
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,743
    Yes, you can access the webpages with the setting given below in lighty conf file.

    server.username = "lighttpd"
    server.groupname = "lighttpd"
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  5. #5
    Join Date
    Mar 2005
    Posts
    359
    Lighttpd doesnt start anymore with:

    server.username = "lighttpd"
    server.groupname = "lighttpd"

    I couldnt found any error on lighttpd.error.log. Maybe need to fix some permissions?

  6. #6
    Join Date
    Apr 2003
    Location
    NC
    Posts
    3,080
    Did you physically add the user? Try:

    adduser lighttpd


    Now start it, if it fails still what are the errors? Note you may have to fix permission problems on the hosted content. If you have all of the content uploaded by one user I would use that user/group in the lighttpd config.
    John W, CISSP, C|EH
    MS Information Security and Assurance
    ITEagleEye.com - Server Administration and Security
    Yawig.com - Managed VPS and Dedicated Servers with VIP Service

  7. #7
    Join Date
    Mar 2005
    Posts
    359
    Quote Originally Posted by eth00
    Did you physically add the user? Try:

    adduser lighttpd


    Now start it, if it fails still what are the errors? Note you may have to fix permission problems on the hosted content. If you have all of the content uploaded by one user I would use that user/group in the lighttpd config.
    Yes, I did that.

    2007-03-31 09:36:51: (mod_fastcgi.c.923) bind failed for: unix:/tmp/php-fastcgi.socket-0 Address already in use
    2007-03-31 09:36:51: (mod_fastcgi.c.1356) [ERROR]: spawning fcgi failed.
    2007-03-31 09:36:51: (server.c.834) Configuration of plugins failed. Going down.

  8. #8
    Join Date
    Dec 2006
    Posts
    477
    Looks like it has aborted previously due to other errors and left the php socket file behind. Delete the file it mentions in your /tmp folder and try again. That or your lighttpd config is trying to start more than one fastcgi server using the same socket file - if you are specifying severl fastcgi configurations in the lighttpd config file you need to give each its own socket file path.

  9. #9
    Join Date
    Mar 2005
    Posts
    359
    Thanks, it worked.

  10. Newsletters

    Subscribe Now & Get The WHT Quick Start Guide!

Related Posts from theWHIR.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •