I would like to have a website capable of converting LaTeX documents to PDF online. So for example user types in some raw LaTeX (document), I'm saving it into my MySQL database and I'm able to convert that LaTeX to PDF docuement available for preview and download.
As I understand, I need to have my own Linux powered server with pdflatex installed on the machine. I have in mind buying EC2 instance on Amazon (+ RDS for MySQL, or MySQL on EC2, doesn't matter much in this case) powering some Linux distribution, installing pdflatex on it and putting some PHP script (Apache, LAMP installed) which could do converting LaTeX to PDF and representing it onto my webpage.
Is this a good way to do it, and if it is could you provide me some more detailed steps - especially installing pdflatex on the machine and connecting it with PHP script?