Q&A Categories
<Find a Question:
Is httpd.conf file the one for the whole server or a particular website ?
Jul
5
2010
Question by smarty: Is httpd.conf file the one for the whole server or a particular website ?
Is httpd.conf file(I know it is a configuration file for Apache) only for use of server or a particular website can make use of it.
What should I do to implement cache control for images and scripts in my website ? Should I change in the conf file or is .htaccess is of any use in this.
I want to do Cache Control in my website hosted on Apache server? Where should I proceed?
Best answer:
Answer by sdn
It’s Apache’s top-level configuration file. You can override the settings in httpd.conf on a per-directory basis by putting a .htaccess file in the directory you want to apply the changes to, but the developers recommend doing as much as is practical in httpd.conf. That makes it easier to keep track of what directives are coming from where.
Give your answer to this question below!
Answer this Question
You must be Logged In to post an Answer.
Not a member yet? Sign Up Now »
Answer #1
Not quite of the both. Some (large) websites are distributed over several servers, while some servers hosts several website.
But what is always true is httpd.conf is the setting for a single Apache instance. It is possible for a — usually large — websites to be actually served by several servers (obviously with different Apache instance). And some of the cheaper or free hosting hosts several websites in a single Apache instance (which means httpd.conf affects several websites at a a time).
If your website is big and is high traffic, it might be better to serve the cacheable content (images, scripts, etc) in a separate server.