Preface
To understand the connection timeout problem between the browser and Apache, you need to understand the HTTP Keep-alive property first. First, a brief introduction to Keep-alive, you can find more detailed information from the Internet.
Both browsers and Apache are based on HTTP protocols. The common explanation for the keep-alive attribute in the HTTP pr
private does not make the cache more secure, it is also passed to the intermediary server (if the Web site for transport security requirements are high, you should use Transport Layer security measures). For public, all servers are allowed to cache the resource. Generally, it is reasonable for cache-control to be set to public for resources that everyone can access (such as the logo, pictures, scripts, etc.) of the website.ExpiresThe same is used to control the cache, and the Expires response h
communicate with the server, but directly uses the local copy. The Apache server allows you to set the Expires value in multiple ways, such as the resource access time or the last modification time. Note that the Time here uses Greenwich Mean Time (GMT) instead of the local Time.When both Expires and Cache-Control appear, the latter usually overwrites the former setting. Because Expires depends on the user's system time, it is generally considere
Apache under Use Expires_module let the browser cache static filesWhy Apache configures static caching:1th, reduce the pressure on the server. 2nd, Save the browser often to the server to download CSS,JS, pictures, static files, etc., reduce unnecessary network IO. Configuration steps:1. In the
Let the browser cache css, JS, pictures, static files and so on is very important things, so as to reduce the pressure on the server, the provincial browser often go to the service side to download these static files. Let's look at the configuration method below.1. Open the Apache extension mod_expires.so and include the following line of code in the
again)Then create a test. py script,
Print "Content-Type: text/html"Print ""Print "Print "Hello World"Print "
Run the http: // localhost/test. py and hello World characters in the browser.
In addition, some error messages are as follows:
If the scriptinterpretersource registry is not added, Error 500 internal server error occurs.If execcgi is not added, the 403 forbidden you don't have permission to access/test. py on this server will appear.I
Configure Python+mod_wsgi+apache when accessing server in Browser error: Invalid http_host header: ' XXXXX '. Need to add u ' XXXXX ' to allowed_hosts, add allowed_hosts[' * ' in setting.py to invalid reason: Apache is not configured servername localhost:80 After the configuration is complete, the above problems are resolvedFailure behavior is: access to
script,
Print "content-type:text/html"Print ""Print "print "Hello World"Print "
Running Http://localhost/test.py,Hello World Two words in a browser indicates that it is working correctly.
In addition, some error prompts are as follows:
No Scriptinterpretersource Registry is added, and a Internal Server error error occurs.Without adding execcgi, you will receive 403 Forbidden you don ' t have permission to access/test.py on the this server.Without
send (for example): server:apache/2.0.41Servertokens OSThe server will send (for example): server:apache/2.0.41 (Unix)Servertokens full (or unspecified)The server will send (for example): server:apache/2.0.41 (Unix) php/4.2.2 mymod/1.2This setting acts on the entire server and cannot be used in the configuration segment of the virtual host.Modify the value of the servertokens as needed, and then restart the server.Nginx Hiding method:Modify nginx.conf Add the following code to the file and modi
Build git server (build git server with Apache on Linux), can checkout, pull, push, create a new demand--walk on the road or in the car, waiting for people or in line, if you want to on the tablet computer or mobile phone to browse code library code, What do we do?
At this time Gitweb shiny debut! Gitweb is a CGI program that supports GIT, and with it you can easily browser the code in a git code base.
Mo
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.