News for hackers. Stuff that matters.

I bought my first server.

i know this may be a stupid question, but i just bought my very first server and i'd like to set up a webserver.

i've searched extensively for guides and everything (trying to have each user have php run as themselves and a cgi-bin), but they all seem to have caveats/issues.

currently on apache, if i mod_rewrite a file like "/index -> index.php", /index.jsp and /index.asp work (which is bad)

on nginx, i tried uploading a gif and was able to do file.gif/file.php and it would execute..

does anyone have a definitive guide on a (reasonably [security is a journey, not a destination]) secure server setup?

( 4 comments | on HN )
Re:I bought my first server. by pharno on Sunday July 17, 2011 @07:07PM (#2774470)
Personally, I run a server (soon two) with Virtualmin/Webmin. They simplify A lot, first of all for people who are new to hosting.

However, it does not provide you with a one click solution for your "/index -> index.php" problem.

Re:I bought my first server. by inportb on Sunday July 17, 2011 @03:48PM (#2774015)
If you'd like each user to run PHP as himself/herself, you'd need at least a separate process per user. Depending on your use case, this may be expensive.
Re:I bought my first server. by vinced on Sunday July 17, 2011 @03:42PM (#2773998)
Re:I bought my first server. by qpi00 on Sunday July 17, 2011 @03:52PM (#2774029)
That was the top of every google result, and where I found a lot of issues (nginx, apache rewrites w/fcgi+suexec