1

I have access to a Linux server with a non-root user. What I need is to run a simple, HTTP server that will not listen to port 80, but to a different port.

I'm looking for the most easiest and quickest solution. Don't need any authentication or whatever.

Would be also nice to run it in a SCREEN.

Linux version is Red Hat 4.1.2-50

  • What exactly is the purpose, just serving some static pages? – mbx Aug 15 '11 at 11:31
  • Actually serving static files via http. lighttpd did the job. – yellowblood Aug 15 '11 at 14:01
  • "Would be also nice to run it in a SCREEN" - eh? It's a daemon? – symcbean Aug 16 '11 at 12:09
4

Your question is quite subjective, and configuring the port should be very easy with any http server.

Though, I would recommend lighttpd with server.port = 1080 (or whatever above 1024 for non-root users) in a configuration file:

server.document-root = "/home/foo/www" 
server.port = 1080

It's a complete enough http server, and for serving static contents, almost no other configuration is needed. Just put your data in the server.document-root directory, and start it with lighttpd -f configuration-file.

  • Thanks a lot, it could be easier but I managed at the end :) – yellowblood Aug 15 '11 at 14:00
  • 1
    @yellowblood Btw, if you want to see the log in your screen, there's a -D option to prevent daemon mode. – Stéphane Gimenez Aug 16 '11 at 15:44
  • Yea, I know that ;) – yellowblood Aug 18 '11 at 7:12
1

On higher ports you usually don't need any elevated permissions. Give lighttp or thttpd a try. Best point to start would be the FAQ, the other Docs are linked from there. If your admin does not have installed any webservers you like, you can dowload and build the source.

0

*mini_httpd** is also a good, small HTTP server. You can configure port in mini_httpd.conf file. Check out more here: mini_http homepage

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.