Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there a lighter alternative (runs in shell, in one process, can be started and stopped easily by the user) to Apache that supports .htaccess files? If not, how could Apache be run in a "lighter" way?

In fact, I'm looking to setup a development environment to mimic an Apache server, so I can then push my code on the production server and get the same behavior. I've looked into setting up a full Apache server on my computer, but it seems like overkill for running in a directory. Maybe I'm missing something.

share|improve this question
    
I'd just set up an Apache config on my computer. Most distros come with a good setup. Won't take long to point a docroot at your local working directory and sudo service httpd restart as needed. –  Kyle Smith Mar 19 '12 at 3:17
    
Why do you need .htaccess files? –  Shane Madden Mar 19 '12 at 3:29
    
@Shane Because that's what "my provider" uses. So I'm stuck with it, and I'm trying to test Apache configs on my PC. –  jonallard Mar 20 '12 at 2:20
add comment

1 Answer

If you are setting up a development environment "to mimic an Apache server," you need to make sure that your development environment is an Apache server. Make sure that it's the same version of Apache that you are using in your production environment. Otherwise, you are guaranteed to experience unforeseen issues when moving projects from development/test into production.

Teams usually look for "lighter" alternatives to Apache because they are having trouble with Apache's heavy RAM utilization footprint on busy servers that are slammed with interactive traffic. Your development environment will not have this problem.

Bottom line: if you want to "get the same behavior" in your development environment, you need to use the same software as in your production environment.

share|improve this answer
1  
If you want to use less RAM, set MaxSpareServers and MinSpareServers to a low number. –  Ladadadada Mar 19 '12 at 7:27
    
"if you want to "get the same behavior" in your development environment, you need to use the same software as in your production environment." -- quoted for truth. –  womble Mar 19 '12 at 7:55
add comment

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.