………………………………………………………………………………………. Options FollowSymLinks AllowOverride None ………………………………………………………………………………………. Apache allows users to upload their own configuration files to change the server’s behavior in short, to let users specify their own options, password protection, MIME types, and so on. The AllowOverride None line shown in the preceding example means that users can’t set these options on a directory unless we say so. And yes, that slash (/) represents the ServerRoot directory, as specified in the systemwide options. Unless specified otherwise, every directory on the server has these permissions, though you can override these settings on particular directories. (We’ll briefly discuss the various permission options in “Directory Configuration,” later in this chapter; for now, just realize that nobody does diddly without our say-so.) To loosen permissions on a directory-by-directory basis, have a look at the default httpd.conf, where You’ll find a set of looser permissions set on various directories. Directory Features Now that we’ve disallowed every feature Apache offers, we can explicitly enable the features we’d like to have. They will allow your Web designers to do many different things, but as an administrator you need to know what each one does. Here are some of the features you might set on a directory. Controlling Access with IP Addresses and Netblocks The Allow and Deny options control which IP addresses and hostnames are permitted to access content in a directory. Browser clients are compared against the “allow” and “deny” lists in the order given in the Order statement. Apache then permits or rejects access depending on the results. When Order is deny, allow, the default is to allow access unless prohibited by a Deny statement. When Order is allow,deny, the default is to deny access unless permitted by an Allow statement. You allow and deny hosts by IP address and hostnames. Every attempted connection is compared against these descriptions, and is treated appropriately. Every attempted connection is part of a special group, All. Much like with TCP Wrappers, you can use the All group and more specific client identification to allow and exclude particular hosts. Confused? Let’s walk through a sample. ………………………………………………………………………………………. Order allow,deny Allow from all Deny from *.AbsoluteBSD.com ………………………………………………………………………………………. I’m browsing to a site from an http://absolutebsd.com/ machine. Apache first checks the Order list (because this is the first statement it encounters), and is told to look at the Allow list and then the Deny list. Since http://absolutebsd.com/ is part of all, I’m allowed in at first. But then Apache checks the deny list and, whoops, I’m cut off. 345
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost PHP Web Hosting services
No comments yet.
Sorry, the comment form is closed at this time.