I had a lighttpd server which works normally. I can access this website from outside(non-localhost) via http://vm.aaa.com:8080. Let's just assume that it's a simple static website, without php or mysql.

Now I want to copy this website as a test one(using another port) in the same machine. And I do not want to use virtual host. So I just copy the whole files of original server, including lighttpd's bin/ conf/ htdocs/ lib/ and so on folders. And I made some required change, including changing lighttpd.conf.

Now what I'm confused is, if change the port to a number that is less than 9000, it works perfectly. But if the port is changed to a number that is equal or greater than 9000, lighttpd can start, but I can not access the new website from outside, while I do can access the new website from INSIDE(I mean in the same LAN or localhost).

The access log from INSIDE is like below:

vm.aaa.com:9876 - - [08/Oct/2012:13:18:47 +0800] "GET / HTTP/1.1" 200 15 "-" " curl/7.12.1 (x86_64-redhat-linux-gnu) libcurl/7.12.1 OpenSSL/0.9.7a zlib/ libidn/0.5.6"

Command I used to start lighttpd is:

bin/lighttpd -f conf/lighttpd.conf -m lib/ -D

My lighttpd.conf is like:

server.modules = (
var.rundir = "/home/work/lighttpd_9876"
server.port = 9876
server.bind = ""
server.pid-file = var.rundir + "/log/lighttpd.pid"
server.document-root        = var.rundir + "/htdocs/"
var.cronolog_path = "/home/work/lighttpd_9876/cronolog/sbin/cronolog"
server.errorlog = ...
accesslog.filename = ...

So why is this happening? I've tried several diffrent ports, still the same. Isn't that ports between 8000 and 65535 are the same?

  • Ports above 32767 are generally considered to be for use with outbound sockets, and should be avoided for listeners. Anyway, what does netstat -apn say if you do configure a port above 9000 and start lighttpd? – rackandboneman Oct 8 '12 at 10:04
  • @rackandboneman He said that he can access the service from localhost and other hosts on the LAN, so the issue most likely isn't with lighttpd. – Ansgar Wiechers Oct 8 '12 at 11:22

Looks like ports above 9000 are being blocked somewhere between your server and the external client. Check with nmap -sT -Pn -p 9876 vm.aaa.com and contact your firewall admin (or your ISP) about the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.