2

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

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

3 Answers 3

6

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.

3
  • Thanks a lot, it could be easier but I managed at the end :) Commented Aug 15, 2011 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. Commented Aug 16, 2011 at 15:44
  • Yea, I know that ;) Commented Aug 18, 2011 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .