How To Enable If-Modified-Since Apache Web Server With Linux
How To Enable If-Modified-Since Apache Web Server With Linux
Post Description:
Post Tags: how, to, enable, if, modified, since, apache, web, server, with, linux, linux, linux support, linux questions, linux server, programming, assistance, questions, answers, tech, it, unix
This Post Has Been Viewed 1091 Times Since Thu Jul 12, 2007 7:15 pm Posted By hostman with 1 replies
Post Description:
Post Tags: how, to, enable, if, modified, since, apache, web, server, with, linux, linux, linux support, linux questions, linux server, programming, assistance, questions, answers, tech, it, unix
This Post Has Been Viewed 1091 Times Since Thu Jul 12, 2007 7:15 pm Posted By hostman with 1 replies
| How To Enable If-Modified-Since Apache Web Server With Linux |
i want to make my websites faster, i've heard of this If-Modified-Since, how can i enable it so that my site will be able to cached my content? is that possible?
Leave Your Comments
Share
URL:
You can use this HTML code to put it on your website to show your friends this wallpaper. Use this code on your profile like myspace, friendster, Facebook or others. Just Copy and Paste it in your HTML on your websites Fourms BBCODE:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums
|
Comments and replies About How To Enable If-Modified-Since Apache Web Server With Linux
:: 1 :: Reply #10687 Reply By hostman On Thu Jul 12, 2007 7:17 pm
i can only give you this information, im not sure if i understand your question:
Apache HTTP Server
Apache uses optional modules to include headers, including both Expires and Cache-Control. Both modules are available in the 1.2 or greater distribution.
The modules need to be built into Apache; although they are included in the distribution, they are not turned on by default. To find out if the modules are enabled in your server, find the httpd binary and run httpd -l; this should print a list of the available modules. The modules we’re looking for are mod_expires and mod_headers.
If they aren’t available, and you have administrative access, you can recompile Apache to include them. This can be done either by uncommenting the appropriate lines in the Configuration file, or using the -enable-module=expires and -enable-module=headers arguments to configure (1.3 or greater). Consult the INSTALL file found with the Apache distribution.
Once you have an Apache with the appropriate modules, you can use mod_expires to specify when representations should expire, either in .htaccess files or in the server’s access.conf file. You can specify expiry from either access or modification time, and apply it to a file type or as a default. See the module documentation for more information, and speak with your local Apache guru if you have trouble.
To apply Cache-Control headers, you’ll need to use the mod_headers module, which allows you to specify arbitrary HTTP headers for a resource. See the mod_headers documentation.
Here’s an example .htaccess file that demonstrates the use of some headers.
.htaccess files allow web publishers to use commands normally only found in configuration files. They affect the content of the directory they’re in and their subdirectories. Talk to your server administrator to find out if they’re enabled.
Note that mod_expires automatically calculates and inserts a Cache-Control:max-age header as appropriate.
Apache 2.0’s configuration is very similar to that of 1.3; see the 2.0 mod_expires and mod_headers documentation for more information.
Apache HTTP Server
Apache uses optional modules to include headers, including both Expires and Cache-Control. Both modules are available in the 1.2 or greater distribution.
The modules need to be built into Apache; although they are included in the distribution, they are not turned on by default. To find out if the modules are enabled in your server, find the httpd binary and run httpd -l; this should print a list of the available modules. The modules we’re looking for are mod_expires and mod_headers.
If they aren’t available, and you have administrative access, you can recompile Apache to include them. This can be done either by uncommenting the appropriate lines in the Configuration file, or using the -enable-module=expires and -enable-module=headers arguments to configure (1.3 or greater). Consult the INSTALL file found with the Apache distribution.
Once you have an Apache with the appropriate modules, you can use mod_expires to specify when representations should expire, either in .htaccess files or in the server’s access.conf file. You can specify expiry from either access or modification time, and apply it to a file type or as a default. See the module documentation for more information, and speak with your local Apache guru if you have trouble.
To apply Cache-Control headers, you’ll need to use the mod_headers module, which allows you to specify arbitrary HTTP headers for a resource. See the mod_headers documentation.
Here’s an example .htaccess file that demonstrates the use of some headers.
### activate mod_expires
ExpiresActive On
### Expire .gif's 1 month from when they're accessed
ExpiredByType image/gif A2592000
### Expire everything else 1 day from when it's last modified
## (this used the Alternative syntx)
ExpiresDefault "modification plus 1 day"
### Apply a Cache-Control header to index.html
< Files index.html >
Header append Cache-Control "Publich, must-revalidate"
< /Files >
ExpiresActive On
### Expire .gif's 1 month from when they're accessed
ExpiredByType image/gif A2592000
### Expire everything else 1 day from when it's last modified
## (this used the Alternative syntx)
ExpiresDefault "modification plus 1 day"
### Apply a Cache-Control header to index.html
< Files index.html >
Header append Cache-Control "Publich, must-revalidate"
< /Files >
.htaccess files allow web publishers to use commands normally only found in configuration files. They affect the content of the directory they’re in and their subdirectories. Talk to your server administrator to find out if they’re enabled.
Note that mod_expires automatically calculates and inserts a Cache-Control:max-age header as appropriate.
Apache 2.0’s configuration is very similar to that of 1.3; see the 2.0 mod_expires and mod_headers documentation for more information.
