Documents, on the other hand, are specific to the web server. The screenful of information that appears in response to a web query is a document.
It can be made up of many files from different directories. The Location container provides an easy way to refer to a complex document as a single entity. We will see examples of Directory and Files containers later in this tutorial. The IfModule statements enclose commands that depend on the specific module; they allow the configuration to load without a syntax error, even if a specific module is not loaded.
The IfDefine statements allow optional Apache features to be selected from the command line. The Red Hat Linux httpd. But most of the contents of the file is information from the Apache developers that is designed to help you understand how to configure Apache.
Still, the Red Hat httpd. To tackle that much information, we have organized the discussion of the configuration file into related topics.
This is not the way the directives are organized inside the configuration file. The configuration file organizes directives by scope: global environment directives, main server directives, and virtual host directives. Where can I find httpd. Ask Question. Asked 2 years ago. Active 1 month ago. Viewed 8k times. Improve this question. Ganesh Kumar Ganesh Kumar 11 1 1 silver badge 3 3 bronze badges. HI Pawan Kumar , thanks for your response , but in conf folder i did not found that httpd.
Add a comment. Active Oldest Votes. On Windows, I have seen people run Apache from all kinds of weird and wonderful places. Improve this answer. RickWeb RickWeb 1, 1 1 gold badge 17 17 silver badges 34 34 bronze badges.
Sign up or log in Sign up using Google. Sign up using Facebook. If your server installation has separate configuration files, you should be able to find or set this directive in the ports. Alternatively, if you want Apache to listen to ports 80 and on all interfaces regardless of the IP address, you can enter the following:.
Doing so makes the server more secure and less vulnerable to attacks. Ideally, the user and group you set should not be able to login to the server ie: have no login credentials and no login shell; they will just be used for handling web client requests.
The example above uses anyUserName as our web user and group; just use a name not reserved for other processes. Next, you need to modify your config file to use the new Apache user and group. If yours says:. Then you need to find where these variables are defined and change their values. Usually, the above directive is preceded by a comment letting you know exactly where to set the new values.
Otherwise, you will just insert the new user and group name in place of the old. So your final config lines could look like this:.
Any Apache directives using a relative path will, by default, append to the root path specified in ServerRoot.
When you first install your server, the configuration and log files are placed in the ServerRoot. You can change its value to a new directory, but make sure to copy the configuration files to the new location.
Also, make sure you do not to add a trailing slash to the path when you modify the value. When an error occurs, Apache logs the error to a log file.
The location of the error log is determined by the value specified using the ErrorLog directive. This file is critical because you will refer to it in order to debug errors, solve server configuration problems, and optimize the server. If the server hosts multiple sites and you want to have separate error logs for each site, you can specify a different file and location for each site in the virtual hosts file. The LogLevel directive controls the level of the messages logged in the error logs.
By default, it is set to warn, meaning that all messages with the value of warning and higher as in more critical will be logged. You can change the value of this directive to adjust the logging level to your preference. This is the default Apache web server document directory, and its contents are readily and publicly available to clients connecting through the web.
0コメント