I have a lighttpd server running on an AWS EC2 instance. It can serve port 80 (or any other port if I change server.port in the /etc/lighttpd/lighttpd.conf file) without problems. However, when I serve an alternate root directory on another port (say, 8080), browsers will never be able to connect to the server.
The corresponding section of my lighttpd.conf file is:
server.port = 80 ## ## Use IPv6? ## server.use-ipv6 = "disable" ## ## bind to a specific IP ## #server.bind = "localhost" ## ## Run as a different username/groupname. ## This requires root permissions during startup. ## server.username = "lighttpd" server.groupname = "lighttpd" ## ## enable core files. ## #server.core-files = "disable" ## ## Document root ## server.document-root = server_root + "/release" $SERVER["socket"] == ":8080" { server.document-root = server_root + "/dev" }
Full file here
The site based on server_root + "/dev" works fine - I tested it by changing their port assignments, and in this case / dev loads normally: 80 and / release were not found.
I read numerous manuals (e.g. here , white papers , here , etc.) to no avail. The first of them said that a firewall conflict could occur, but I donβt know how to resolve it on EC2, and the fact that I can set server.port=8080 without problems makes me think that this is not a problem.
Both folders belong to my user lighttpd , which has full rights in both folders.
I do not see anything in the log files when accessing <my address>:8080 .
source share