Project

General

Profile

Change default server port

Added by Copycat over 13 years ago

In lighttpd.conf i change "server.port = 80" to "server.port = 82", but lighttpd still trying to bind port 80. There is a log, first i start webfs, who bind 80 port, then start lighttpd

root@chimera:~# sudo /etc/init.d/webfs start
Starting httpd daemon: webfsd.
root@chimera:~# sudo /etc/init.d/lighttpd start
Starting web server: lighttpd2011-02-16 07:38:37: (network.c.358) can't bind to port: :: 80 Address already in use

lighttpd.conf:

server.port = 82
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
"mod_fastcgi",
"mod_rewrite",
)
server.document-root = "/var/www"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
dir-listing.activate = "enable"
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm",
" index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
include_shell "/usr/share/lighttpd/use-ipv6.pl"
dir-listing.encoding = "utf-8"
server.dir-listing = "enable"
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/x-javascript", "text/css", "text/html", "text/plain" )
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
fastcgi.server = (
".php" => (
"localhost" => (
"socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/usr/bin/php-cgi"
)
)
)
$HTTP["host"] == "194.143.145.241" {
server.document-root = "/var/www/habari"
dir-listing.activate = "disable"
url.rewrite-once = (
"^/(?!scripts/|3rdparty/|system/|doc/|user/(?:themes/|files/|plugins/|locales/|sites/))[^?]*(\?(.*))?" => "/index.php/$1"
)
}
$HTTP["host"] == "192.168.1.150" {
server.document-root = "/var/www/habari"
dir-listing.activate = "disable"
url.rewrite-once = (
"^/(?!scripts/|3rdparty/|system/|doc/|user/(?:themes/|files/|plugins/|locales/|sites/))[^?]*(\?(.*))?" => "/index.php/$1"
)
}

Replies (1)

RE: Change default server port - Added by darix over 13 years ago

check the output of:
include_shell "/usr/share/lighttpd/use-ipv6.pl"

and
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"

one of those is causing your problems.

    (1-1/1)