Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

share|improve this question
    
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

3 Answers 3

up vote 4 down vote accepted

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.

share|improve this answer
    
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

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.

share|improve this answer

*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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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