What are the best practices for web server setup?
-
I am curious about best possible web server setup. We have to host Python and PHP web applications. 1. Under what user these apps should be running? 2. If we incorporate version control like pushing changes to git, should we have a separate user? Please outline how you would go about setting up a blank server with respect to users and directories if you are to host Python/Ruby apps.
-
Answer:
If you're running Apache, I strongly recommend using something like the MPM-ITK module to let you run different sites as different users. It allows the best of both worlds: you can allow your users to run websites and upload files via FTP/Git, while still ensuring that no site is able to access files for any other site. If you're setting up web hosting for third parties who want to be able to control their own sites and not make changes through you, and you're unfamiliar with setting up a shared hosting environment, you may want to consider paying for a cPanel/WHM license. It's really easy to shoot yourself in the foot when it comes to hosting security, even if you've been doing it for years. Using cPanel puts a safety on the trigger, so to speak.
Matt Muller at Quora Visit the source
Other answers
Here is a quick tip: Don't use the root user, create a separate user for your apps/websites Use the same user to push to your git repository. In some cases your web server user (i.e: apache/nginx user) might conflict with the user you created (i.e: one requires write permissions on a file owned by the other) in this case you can add both users to the same group and give proper permissions like 775
Nidal AlHariri
Related Q & A:
- What is the difference between application server and web server?Best solution by Server Fault
- What are some best practices to follow when designing for users completely unfamiliar with computers?Best solution by User Experience
- What is the best setup for street skating?Best solution by Yahoo! Answers
- What is the best setup for my home theater system?Best solution by dolby.com
- What is the best cables for HD setup?
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.