![]() |
Apache Configuration Tips
Apache
Apache archive composed Apache server begin Apache server configuration Apache waiter user authentication user web catalogue network hosting 1.Apache Introduction WWW (World Wide Web) HTTP (HyperText Transfer Protocol) Modular 2.Apache interactive software package to access the combination of the / etc / httpd / conf / * The main configuration file location / etc / rc.d / init.d / httpd startup script ; / home / httpd / html html document's main Directory / home / httpd / html / handbook / * ; html format documentation for / home / httpd / icons / * html web sheet using the icon in the file ; / usr / sbin / * -/usr/sbin/htpasswd apache user create and update the agenda -/usr/sbin/httpd http server program / var / record / httpd / * ; log file 3.Apache server startup / etc / rc.d / init.d / httpd start (reload / restart / stop) so that it automatically runs ntsysv 4.Apache server configuration 1. httpd configuration file . conf srm.conf access.conf 2.httpd.conf ; ServerType standlone / inetd server's operating mode Port 80 In standlone mode wharf it is hearing ; User nobody process landlord running Group nobody group process namely fleeing ; ServerAdmin admin @ localhost Administrator mailbox ServerRoot ; server document position ServerName httpserver Server Name ; Timeout 300 set up the server and client connectiin due timeout MaxClient 300 ; allows the number of clients simultaneously joined ProxyRequests on ; allowed to doing for proxy DocumentRoot / home / httpd / html br> UserDir public_html ; server,GHD Hair Straightener, the user's own home directory ; DirectoryIndex index.html classify index file AccessFileName. htaccess In each directory access control message involved in the file name ; Alias / icons / ; for the file not create an alias under DocumentRoot ; < VirtualHost > < / VirtualHost > ; < Directory > < / Directory > ; 3. Directory Access Control - - at adjusting the httpd.conf file to set the Directory portal Ex: ; < Directory Options Indexes ; AllowOverride None order allow ,GHD Purple Styler, deny ; allow from all < / Directory > Options command - Control access to a directory traits ;-None: ;-All: ;-ExecCGI: can execute cgi scripts ;-Indexes: not index file to access a directory, returns a file List AllowOverride directive ; - -None: do not read. htaccess - Limit: coverage control host access to the bid (allow,GHD Midnight Collection, deny) -AuthConfig: Allows you to override the instructions with the certification ; (AuthType, AuthName) ; order instruction control processing permit and renounce directives in the mandate ; Ex: order allow, deny ; deny from all ; allow from host11 ; allow direction For a directory is,GHD Gold Classic, aldefect in ...struction set which hosts are allowed access to -all: all hosts - Domain: eloo . com ; - a complete IP: 192.168.0.1 - Network digit / mask: 192.168.0.0/255.255.255.0 ; - Network Number / nnn: 192.168.0.0/24 ; deny command For a directory is, alin the absnece ofstruction sets opposition which hosts access -all: all hosts - Domain : eloo.com ; - a complete IP: 192.168.0.1 - Network number / mask: 192.168.0.0/255.255.255.0 ; - Network Number / nnn: 192.168.0.0/24 user authentication function: only lawful list name and password to access to the specified contents of the directory 1. to create a user database Format: lpeng: BQ5DFS3 %#$% General on the appearance DocumentRoot # htpasswd-bc / etc / httpd / users user1 1234 2. Use user database ; in the establishment of the directory to be protected ; Ex: AuthName AuthType Basic ; AuthUserFile / etc / httpd / users ; require valid-user (requrie user < username1 & gt Note: You can likewise create a user group file, and then clarify the user group here ; logo / etc / httpd / groups ; teacher: jacky lpeng Ex: ; AuthName ; AuthType Basic AuthGroupFile / etc / httpd / users require group < group1 > another case: ; Ex: AuthName ; Member Area AuthType Basic ; AuthGroupFile / etc / httpd / users ; require group < group1 > Allow from ; Deny from satisfy all / / use either,GHD Pink Limited Edition, have to encounter ahead satisfy whichever ; / / base a can database using php + mysql implement user authentication 6. User Web Directory Apache allows users on the host specific directories cache the user's own home http://hostname/ ~ username / ; a way UserDir public_html Note: This directory must be situated in the user's home directory other ways ; UserDir / home / httpd / * / httpd 7. virtual host name based virtual host & lt; VirtualHost 192.168.103.11 > ServerAdmin [email = [ft = # 5c7f8b,,] webmaster@host.som ] webmaster@host.som [/ email] e_domain.com DocumentRoot / home / eloo / a / logs / host.some_domain.com-error_log CustomLog / home / eloo / logs / host.some_domain.com-access_log prevalent < / VirtualHost > experiment: 1. create / home / httpd / htmlapachetest directory and its permissions restrictions,GHD Hair Straighteners, so that users tin access aa ; 2. set their own personal home page aboard the server space 3. Set the element label mydomain.com home directory is / home / httpd / html increase an alias username.mydomain.com ; to access / family / username / html directory contents |
All times are GMT. The time now is 02:12 PM. |
Powered by vBulletin Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Free Advertising Forums | Free Advertising Message Boards | Post Free Ads Forum