来看看Apache什么问题???

由 tyima 在 04-14-2003 01:25 发表:

来看看Apache什么问题???

只能手工启动:

shell>apache start

然后显示:[warn]Apache does not support line-end comments,

consider using quotes around argument:"#-1"

Apache start

然后Apache还是能用了,但是不能开机就自动运行,只能手动开启,已经设置了相关的参数了啊。

应该是httpd.conf里的问题?怎么弄啊。


由 ryhbgs 在 04-14-2003 08:23 发表:


你把http。conf的文件贴出来啊!!


由 tyima 在 04-24-2003 15:39 发表:


Based upon the NCSA server configuration files originally by Rob McCool.

This is the main Apache server configuration file. It contains the

configuration directives that give the server its instructions.

See

   1<url: docs-2.0="" http:="" httpd.apache.org=""> for detailed information about   
   2  
   3# the directives.   
   4  
   5#   
   6  
   7# Do NOT simply read the instructions in here without understanding   
   8  
   9# what they do. They're here only as hints or reminders. If you are unsure   
  10  
  11# consult the online docs. You have been warned.   
  12  
  13#   
  14  
  15# The configuration directives are grouped into three basic sections:   
  16  
  17# 1. Directives that control the operation of the Apache server process as a   
  18  
  19# whole (the 'global environment').   
  20  
  21# 2. Directives that define the parameters of the 'main' or 'default' server,   
  22  
  23# which responds to requests that aren't handled by a virtual host.   
  24  
  25# These directives also provide default values for the settings   
  26  
  27# of all virtual hosts.   
  28  
  29# 3. Settings for virtual hosts, which allow Web requests to be sent to   
  30  
  31# different IP addresses or hostnames and have them handled by the   
  32  
  33# same Apache server process.   
  34  
  35#   
  36  
  37# Configuration and logfile names: If the filenames you specify for many   
  38  
  39# of the server's control files begin with "/" (or "drive:/" for Win32), the   
  40  
  41# server will use that explicit path. If the filenames do *not* begin   
  42  
  43# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"   
  44  
  45# with ServerRoot set to "/usr/local/apache" will be interpreted by the   
  46  
  47# server as "/usr/local/apache/logs/foo.log".   
  48  
  49#   
  50  
  51  
  52  
  53### Section 1: Global Environment   
  54  
  55#   
  56  
  57# The directives in this section affect the overall operation of Apache,   
  58  
  59# such as the number of concurrent requests it can handle or where it   
  60  
  61# can find its configuration files.   
  62  
  63#   
  64  
  65  
  66  
  67#   
  68  
  69# ServerRoot: The top of the directory tree under which the server's   
  70  
  71# configuration, error, and log files are kept.   
  72  
  73#   
  74  
  75# NOTE! If you intend to place this on an NFS (or otherwise network)   
  76  
  77# mounted filesystem then please read the LockFile documentation (available   
  78  
  79# at <url: docs-2.0="" http:="" httpd.apache.org="" mo...n.html#lockfile=""> );   
  80  
  81# you will save yourself a lot of trouble.   
  82  
  83#   
  84  
  85# Do NOT add a slash at the end of the directory path.   
  86  
  87#   
  88  
  89ServerRoot "/usr/local/apache"   
  90  
  91  
  92  
  93#   
  94  
  95# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.   
  96  
  97#   
  98  
  99<ifmodule !mpm_winnt.c="">
 100<ifmodule !mpm_netware.c="">   
 101  
 102#LockFile logs/accept.lock   
 103  
 104</ifmodule>
 105</ifmodule>   
 106  
 107  
 108  
 109#   
 110  
 111# ScoreBoardFile: File used to store internal server process information.   
 112  
 113# If unspecified (the default), the scoreboard will be stored in an   
 114  
 115# anonymous shared memory segment, and will be unavailable to third-party   
 116  
 117# applications.   
 118  
 119# If specified, ensure that no two invocations of Apache share the same   
 120  
 121# scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.   
 122  
 123#   
 124  
 125<ifmodule !mpm_netware.c="">
 126<ifmodule !perchild.c="">   
 127  
 128#ScoreBoardFile logs/apache_runtime_status   
 129  
 130</ifmodule>
 131</ifmodule>   
 132  
 133  
 134  
 135  
 136  
 137#   
 138  
 139# PidFile: The file in which the server should record its process   
 140  
 141# identification number when it starts.   
 142  
 143#   
 144  
 145<ifmodule !mpm_netware.c="">   
 146  
 147PidFile logs/httpd.pid   
 148  
 149</ifmodule>   
 150  
 151  
 152  
 153#   
 154  
 155# Timeout: The number of seconds before receives and sends time out.   
 156  
 157#   
 158  
 159Timeout 300   
 160  
 161  
 162  
 163#   
 164  
 165# KeepAlive: Whether or not to allow persistent connections (more than   
 166  
 167# one request per connection). Set to "Off" to deactivate.   
 168  
 169#   
 170  
 171KeepAlive On   
 172  
 173  
 174  
 175#   
 176  
 177# MaxKeepAliveRequests: The maximum number of requests to allow   
 178  
 179# during a persistent connection. Set to 0 to allow an unlimited amount.   
 180  
 181# We recommend you leave this number high, for maximum performance.   
 182  
 183#   
 184  
 185MaxKeepAliveRequests 100   
 186  
 187  
 188  
 189#   
 190  
 191# KeepAliveTimeout: Number of seconds to wait for the next request from the   
 192  
 193# same client on the same connection.   
 194  
 195#   
 196  
 197KeepAliveTimeout 15   
 198  
 199  
 200  
 201##   
 202  
 203## Server-Pool Size Regulation (MPM specific)   
 204  
 205##   
 206  
 207  
 208  
 209# prefork MPM   
 210  
 211# StartServers: number of server processes to start   
 212  
 213# MinSpareServers: minimum number of server processes which are kept spare   
 214  
 215# MaxSpareServers: maximum number of server processes which are kept spare   
 216  
 217# MaxClients: maximum number of server processes allowed to start   
 218  
 219# MaxRequestsPerChild: maximum number of requests a server process serves   
 220  
 221<ifmodule prefork.c="">   
 222  
 223StartServers 5   
 224  
 225MinSpareServers 5   
 226  
 227MaxSpareServers 10   
 228  
 229MaxClients 150   
 230  
 231MaxRequestsPerChild 0   
 232  
 233</ifmodule>   
 234  
 235  
 236  
 237# worker MPM   
 238  
 239# StartServers: initial number of server processes to start   
 240  
 241# MaxClients: maximum number of simultaneous client connections   
 242  
 243# MinSpareThreads: minimum number of worker threads which are kept spare   
 244  
 245# MaxSpareThreads: maximum number of worker threads which are kept spare   
 246  
 247# ThreadsPerChild: constant number of worker threads in each server process   
 248  
 249# MaxRequestsPerChild: maximum number of requests a server process serves   
 250  
 251<ifmodule worker.c="">   
 252  
 253StartServers 2   
 254  
 255MaxClients 150   
 256  
 257MinSpareThreads 25   
 258  
 259MaxSpareThreads 75   
 260  
 261ThreadsPerChild 25   
 262  
 263MaxRequestsPerChild 0   
 264  
 265</ifmodule>   
 266  
 267  
 268  
 269# perchild MPM   
 270  
 271# NumServers: constant number of server processes   
 272  
 273# StartThreads: initial number of worker threads in each server process   
 274  
 275# MinSpareThreads: minimum number of worker threads which are kept spare   
 276  
 277# MaxSpareThreads: maximum number of worker threads which are kept spare   
 278  
 279# MaxThreadsPerChild: maximum number of worker threads in each server process   
 280  
 281# MaxRequestsPerChild: maximum number of connections per server process   
 282  
 283<ifmodule perchild.c="">   
 284  
 285NumServers 5   
 286  
 287StartThreads 5   
 288  
 289MinSpareThreads 5   
 290  
 291MaxSpareThreads 10   
 292  
 293MaxThreadsPerChild 20   
 294  
 295MaxRequestsPerChild 0   
 296  
 297</ifmodule>   
 298  
 299  
 300  
 301# WinNT MPM   
 302  
 303# ThreadsPerChild: constant number of worker threads in the server process   
 304  
 305# MaxRequestsPerChild: maximum number of requests a server process serves   
 306  
 307<ifmodule mpm_winnt.c="">   
 308  
 309ThreadsPerChild 250   
 310  
 311MaxRequestsPerChild 0   
 312  
 313</ifmodule>   
 314  
 315  
 316  
 317# BeOS MPM   
 318  
 319# StartThreads: how many threads do we initially spawn?   
 320  
 321# MaxClients: max number of threads we can have (1 thread == 1 client)   
 322  
 323# MaxRequestsPerThread: maximum number of requests each thread will process   
 324  
 325<ifmodule beos.c="">   
 326  
 327StartThreads 10   
 328  
 329MaxClients 50   
 330  
 331MaxRequestsPerThread 10000   
 332  
 333</ifmodule>   
 334  
 335  
 336  
 337# NetWare MPM   
 338  
 339# ThreadStackSize: Stack size allocated for each worker thread   
 340  
 341# StartThreads: Number of worker threads launched at server startup   
 342  
 343# MinSpareThreads: Minimum number of idle threads, to handle request spikes   
 344  
 345# MaxSpareThreads: Maximum number of idle threads   
 346  
 347# MaxThreads: Maximum number of worker threads alive at the same time   
 348  
 349# MaxRequestsPerChild: Maximum number of requests a thread serves. It is   
 350  
 351# recommended that the default value of 0 be set for this   
 352  
 353# directive on NetWare. This will allow the thread to   
 354  
 355# continue to service requests indefinitely.   
 356  
 357<ifmodule mpm_netware.c="">   
 358  
 359ThreadStackSize 65536   
 360  
 361StartThreads 250   
 362  
 363MinSpareThreads 25   
 364  
 365MaxSpareThreads 250   
 366  
 367MaxThreads 1000   
 368  
 369MaxRequestsPerChild 0   
 370  
 371</ifmodule>   
 372  
 373#AddType application/x-httpd-php.php   
 374  
 375AddType application/x-httpd-php .php   
 376  
 377AddType application/x-httpd-php .php3   
 378  
 379  
 380  
 381AddType application/x-httpd-php-source .phps   
 382  
 383#AddModule modules/php4/libphp4.a   
 384  
 385#LoadModule php4_module libexec/libphp4.so   
 386  
 387#AddModule mod_php4.c   
 388  
 389  
 390  
 391# OS/2 MPM   
 392  
 393# StartServers: Number of server processes to maintain   
 394  
 395# MinSpareThreads: Minimum number of idle threads per process,   
 396  
 397# to handle request spikes   
 398  
 399# MaxSpareThreads: Maximum number of idle threads per process   
 400  
 401# MaxRequestsPerChild: Maximum number of connections per server process   
 402  
 403<ifmodule mpmt_os2.c="">   
 404  
 405StartServers 2   
 406  
 407MinSpareThreads 5   
 408  
 409MaxSpareThreads 10   
 410  
 411MaxRequestsPerChild 0   
 412  
 413</ifmodule>   
 414  
 415  
 416  
 417#   
 418  
 419# Listen: Allows you to bind Apache to specific IP addresses and/or   
 420  
 421# ports, instead of the default. See also the <virtualhost>   
 422  
 423# directive.   
 424  
 425#   
 426  
 427# Change this to Listen on specific IP addresses as shown below to   
 428  
 429# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)   
 430  
 431#   
 432  
 433#Listen 12.34.56.78:80   
 434  
 435  
 436  
 437Listen 80   
 438  
 439  
 440  
 441#   
 442  
 443# Dynamic Shared Object (DSO) Support   
 444  
 445#   
 446  
 447# To be able to use the functionality of a module which was built as a DSO you   
 448  
 449# have to place corresponding `LoadModule' lines at this location so the   
 450  
 451# directives contained in it are actually available _before_ they are used.   
 452  
 453# Statically compiled modules (those listed by `httpd -l') do not need   
 454  
 455# to be loaded here.   
 456  
 457#   
 458  
 459# Example:   
 460  
 461# LoadModule foo_module modules/mod_foo.so   
 462  
 463LoadModule php4_module libexec/libphp4.so   
 464  
 465#   
 466  
 467  
 468  
 469#   
 470  
 471# ExtendedStatus controls whether Apache will generate "full" status   
 472  
 473# information (ExtendedStatus On) or just basic information (ExtendedStatus   
 474  
 475# Off) when the "server-status" handler is called. The default is Off.   
 476  
 477#   
 478  
 479#ExtendedStatus On   
 480  
 481  
 482  
 483### Section 2: 'Main' server configuration   
 484  
 485#   
 486  
 487# The directives in this section set up the values used by the 'main'   
 488  
 489# server, which responds to any requests that aren't handled by a   
 490  
 491# <virtualhost> definition. These values also provide defaults for   
 492  
 493# any <virtualhost> containers you may define later in the file.   
 494  
 495#   
 496  
 497# All of these directives may appear inside <virtualhost> containers,   
 498  
 499# in which case these default settings will be overridden for the   
 500  
 501# virtual host being defined.   
 502  
 503#   
 504  
 505  
 506  
 507<ifmodule !mpm_winnt.c="">
 508<ifmodule !mpm_netware.c="">   
 509  
 510#   
 511  
 512# If you wish httpd to run as a different user or group, you must run   
 513  
 514# httpd as root initially and it will switch.   
 515  
 516#   
 517  
 518# User/Group: The name (or #number) of the user/group to run httpd as.   
 519  
 520# . On SCO (ODT 3) use "User nouser" and "Group nogroup".   
 521  
 522# . On HPUX you may not be able to use shared memory as nobody, and the   
 523  
 524# suggested workaround is to create a user www and use that user.   
 525  
 526# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)   
 527  
 528# when the value of (unsigned)Group is above 60000;   
 529  
 530# don't use Group #-1 on these systems!   
 531  
 532#   
 533  
 534User nobody   
 535  
 536Group #-1   
 537  
 538</ifmodule>
 539</ifmodule>   
 540  
 541  
 542  
 543#   
 544  
 545# ServerAdmin: Your address, where problems with the server should be   
 546  
 547# e-mailed. This address appears on some server-generated pages, such   
 548  
 549# as error documents. e.g. [email protected]   
 550  
 551#   
 552  
 553ServerAdmin [email protected] ess   
 554  
 555  
 556  
 557#   
 558  
 559# ServerName gives the name and port that the server uses to identify itself.   
 560  
 561# This can often be determined automatically, but we recommend you specify   
 562  
 563# it explicitly to prevent problems during startup.   
 564  
 565#   
 566  
 567# If this is not set to valid DNS name for your host, server-generated   
 568  
 569# redirections will not work. See also the UseCanonicalName directive.   
 570  
 571#   
 572  
 573# If your host doesn't have a registered DNS name, enter its IP address here.   
 574  
 575# You will have to access it by its address anyway, and this will make   
 576  
 577# redirections work in a sensible way.   
 578  
 579#   
 580  
 581#ServerName new.host.name:80   
 582  
 583  
 584  
 585#   
 586  
 587# UseCanonicalName: Determines how Apache constructs self-referencing   
 588  
 589# URLs and the SERVER_NAME and SERVER_PORT variables.   
 590  
 591# When set "Off", Apache will use the Hostname and Port supplied   
 592  
 593# by the client. When set "On", Apache will use the value of the   
 594  
 595# ServerName directive.   
 596  
 597#   
 598  
 599UseCanonicalName Off   
 600  
 601  
 602  
 603#   
 604  
 605# DocumentRoot: The directory out of which you will serve your   
 606  
 607# documents. By default, all requests are taken from this directory, but   
 608  
 609# symbolic links and aliases may be used to point to other locations.   
 610  
 611#   
 612  
 613DocumentRoot "/usr/local/apache/htdocs"   
 614  
 615  
 616  
 617#   
 618  
 619# Each directory to which Apache has access can be configured with respect   
 620  
 621# to which services and features are allowed and/or disabled in that   
 622  
 623# directory (and its subdirectories).   
 624  
 625#   
 626  
 627# First, we configure the "default" to be a very restrictive set of   
 628  
 629# features.   
 630  
 631#   
 632  
 633<directory></directory>   
 634  
 635Options FollowSymLinks   
 636  
 637AllowOverride None   
 638  
 639   
 640  
 641  
 642  
 643#   
 644  
 645# Note that from this point forward you must specifically allow   
 646  
 647# particular features to be enabled - so if something's not working as   
 648  
 649# you might expect, make sure that you have specifically enabled it   
 650  
 651# below.   
 652  
 653#   
 654  
 655  
 656  
 657#   
 658  
 659# This should be changed to whatever you set DocumentRoot to.   
 660  
 661#   
 662  
 663<directory "="" apache="" htdocs"="" local="" usr="">   
 664  
 665  
 666  
 667#   
 668  
 669# Possible values for the Options directive are "None", "All",   
 670  
 671# or any combination of:   
 672  
 673# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews   
 674  
 675#   
 676  
 677# Note that "MultiViews" must be named *explicitly* --- "Options All"   
 678  
 679# doesn't give it to you.   
 680  
 681#   
 682  
 683# The Options directive is both complicated and important. Please see   
 684  
 685# http://httpd.apache.org/docs-2.0/mod/core.html#options   
 686  
 687# for more information.   
 688  
 689#   
 690  
 691Options Indexes FollowSymLinks   
 692  
 693  
 694  
 695#   
 696  
 697# AllowOverride controls what directives may be placed in .htaccess files.   
 698  
 699# It can be "All", "None", or any combination of the keywords:   
 700  
 701# Options FileInfo AuthConfig Limit   
 702  
 703#   
 704  
 705AllowOverride None   
 706  
 707  
 708  
 709#   
 710  
 711# Controls who can get stuff from this server.   
 712  
 713#   
 714  
 715Order allow,deny   
 716  
 717Allow from all   
 718  
 719  
 720  
 721</directory>   
 722  
 723  
 724  
 725#   
 726  
 727# UserDir: The name of the directory that is appended onto a user's home   
 728  
 729# directory if a ~user request is received.   
 730  
 731#   
 732  
 733UserDir public_html   
 734  
 735  
 736  
 737#   
 738  
 739# Control access to UserDir directories. The following is an example   
 740  
 741# for a site where these directories are restricted to read-only.   
 742  
 743#   
 744  
 745#<directory *="" home="" public_html="">   
 746  
 747# AllowOverride FileInfo AuthConfig Limit Indexes   
 748  
 749# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec   
 750  
 751# <limit get="" options="" post="" propfind="">   
 752  
 753# Order allow,deny   
 754  
 755# Allow from all   
 756  
 757# </limit>   
 758  
 759# <limitexcept get="" options="" post="" propfind="">   
 760  
 761# Order deny,allow   
 762  
 763# Deny from all   
 764  
 765# </limitexcept>   
 766  
 767#</directory>   
 768  
 769  
 770  
 771#   
 772  
 773# DirectoryIndex: sets the file that Apache will serve if a directory   
 774  
 775# is requested.   
 776  
 777#   
 778  
 779# The index.html.var file (a type-map) is used to deliver content-   
 780  
 781# negotiated documents. The MultiViews Option can be used for the   
 782  
 783# same purpose, but it is much slower.   
 784  
 785#   
 786  
 787DirectoryIndex index.html index.html.var index.php index.php3   
 788  
 789  
 790  
 791#   
 792  
 793# AccessFileName: The name of the file to look for in each directory   
 794  
 795# for additional configuration directives. See also the AllowOverride   
 796  
 797# directive.   
 798  
 799#   
 800  
 801AccessFileName .htaccess   
 802  
 803  
 804  
 805#   
 806  
 807# The following lines prevent .htaccess and .htpasswd files from being   
 808  
 809# viewed by Web clients.   
 810  
 811#   
 812  
 813<files "^\\.ht"="" ~="">   
 814  
 815Order allow,deny   
 816  
 817Deny from all   
 818  
 819</files>   
 820  
 821  
 822  
 823#   
 824  
 825# TypesConfig describes where the mime.types file (or equivalent) is   
 826  
 827# to be found.   
 828  
 829#   
 830  
 831TypesConfig conf/mime.types   
 832  
 833  
 834  
 835#   
 836  
 837# DefaultType is the default MIME type the server will use for a document   
 838  
 839# if it cannot otherwise determine one, such as from filename extensions.   
 840  
 841# If your server contains mostly text or HTML documents, "text/plain" is   
 842  
 843# a good value. If most of your content is binary, such as applications   
 844  
 845# or images, you may want to use "application/octet-stream" instead to   
 846  
 847# keep browsers from trying to display binary files as though they are   
 848  
 849# text.   
 850  
 851#   
 852  
 853DefaultType text/plain   
 854  
 855  
 856  
 857#   
 858  
 859# The mod_mime_magic module allows the server to use various hints from the   
 860  
 861# contents of the file itself to determine its type. The MIMEMagicFile   
 862  
 863# directive tells the module where the hint definitions are located.   
 864  
 865#   
 866  
 867<ifmodule mod_mime_magic.c="">   
 868  
 869MIMEMagicFile conf/magic   
 870  
 871</ifmodule>   
 872  
 873  
 874  
 875#   
 876  
 877# HostnameLookups: Log the names of clients or just their IP addresses   
 878  
 879# e.g., www.apache.org (on) or 204.62.129.132 (off).   
 880  
 881# The default is off because it'd be overall better for the net if people   
 882  
 883# had to knowingly turn this feature on, since enabling it means that   
 884  
 885# each client request will result in AT LEAST one lookup request to the   
 886  
 887# nameserver.   
 888  
 889#   
 890  
 891HostnameLookups Off   
 892  
 893  
 894  
 895#   
 896  
 897# EnableMMAP: Control whether memory-mapping is used to deliver   
 898  
 899# files (assuming that the underlying OS supports it).   
 900  
 901# The default is on; turn this off if you serve from NFS-mounted   
 902  
 903# filesystems. On some systems, turning it off (regardless of   
 904  
 905# filesystem) can improve performance; for details, please see   
 906  
 907# http://httpd.apache.org/docs-2.0/mo...html#enablemmap   
 908  
 909#   
 910  
 911#EnableMMAP off   
 912  
 913  
 914  
 915#   
 916  
 917# EnableSendfile: Control whether the sendfile kernel support is   
 918  
 919# used to deliver files (assuming that the OS supports it).   
 920  
 921# The default is on; turn this off if you serve from NFS-mounted   
 922  
 923# filesystems. Please see   
 924  
 925# http://httpd.apache.org/docs-2.0/mo...#enablesendfile   
 926  
 927#   
 928  
 929#EnableSendfile off   
 930  
 931  
 932  
 933#   
 934  
 935# ErrorLog: The location of the error log file.   
 936  
 937# If you do not specify an ErrorLog directive within a <virtualhost>   
 938  
 939# container, error messages relating to that virtual host will be   
 940  
 941# logged here. If you *do* define an error logfile for a <virtualhost>   
 942  
 943# container, that host's errors will be logged there and not here.   
 944  
 945#   
 946  
 947ErrorLog logs/error_log   
 948  
 949  
 950  
 951#   
 952  
 953# LogLevel: Control the number of messages logged to the error_log.   
 954  
 955# Possible values include: debug, info, notice, warn, error, crit,   
 956  
 957# alert, emerg.   
 958  
 959#   
 960  
 961LogLevel warn   
 962  
 963  
 964  
 965#   
 966  
 967# The following directives define some format nicknames for use with   
 968  
 969# a CustomLog directive (see below).   
 970  
 971#   
 972  
 973LogFormat "%h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined   
 974  
 975LogFormat "%h %l %u %t \"%r\" %&gt;s %b" common   
 976  
 977LogFormat "%{Referer}i -&gt; %U" referer   
 978  
 979LogFormat "%{User-agent}i" agent   
 980  
 981  
 982  
 983# You need to enable mod_logio.c to use %I and %O   
 984  
 985#LogFormat "%h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio   
 986  
 987  
 988  
 989#   
 990  
 991# The location and format of the access logfile (Common Logfile Format).   
 992  
 993# If you do not define any access logfiles within a <virtualhost>   
 994  
 995# container, they will be logged here. Contrariwise, if you *do*   
 996  
 997# define per-<virtualhost> access logfiles, transactions will be   
 998  
 999# logged therein and *not* in this file.   
1000  
1001#   
1002  
1003CustomLog logs/access_log common   
1004  
1005  
1006  
1007#   
1008  
1009# If you would like to have agent and referer logfiles, uncomment the   
1010  
1011# following directives.   
1012  
1013#   
1014  
1015#CustomLog logs/referer_log referer   
1016  
1017#CustomLog logs/agent_log agent   
1018  
1019  
1020  
1021#   
1022  
1023# If you prefer a single logfile with access, agent, and referer information   
1024  
1025# (Combined Logfile Format) you can use the following directive.   
1026  
1027#   
1028  
1029#CustomLog logs/access_log combined   
1030  
1031  
1032  
1033#   
1034  
1035# ServerTokens   
1036  
1037# This directive configures what you return as the Server HTTP response   
1038  
1039# Header. The default is 'Full' which sends information about the OS-Type   
1040  
1041# and compiled in modules.   
1042  
1043# Set to one of: Full | OS | Minor | Minimal | Major | Prod   
1044  
1045# where Full conveys the most information, and Prod the least.   
1046  
1047#   
1048  
1049ServerTokens Full   
1050  
1051  
1052  
1053#   
1054  
1055# Optionally add a line containing the server version and virtual host   
1056  
1057# name to server-generated pages (internal error documents, FTP directory   
1058  
1059# listings, mod_status and mod_info output etc., but not CGI generated   
1060  
1061# documents or custom error documents).   
1062  
1063# Set to "EMail" to also include a mailto: link to the ServerAdmin.   
1064  
1065# Set to one of: On | Off | EMail   
1066  
1067#   
1068  
1069ServerSignature On   
1070  
1071  
1072  
1073#   
1074  
1075# Aliases: Add here as many aliases as you need (with no limit). The format is   
1076  
1077# Alias fakename realname   
1078  
1079#   
1080  
1081# Note that if you include a trailing / on fakename then the server will   
1082  
1083# require it to be present in the URL. So "/icons" isn't aliased in this   
1084  
1085# example, only "/icons/". If the fakename is slash-terminated, then the   
1086  
1087# realname must also be slash terminated, and if the fakename omits the   
1088  
1089# trailing slash, the realname must also omit it.   
1090  
1091#   
1092  
1093# We include the /icons/ alias for FancyIndexed directory listings. If you   
1094  
1095# do not use FancyIndexing, you may comment this out.   
1096  
1097#   
1098  
1099Alias /icons/ "/usr/local/apache/icons/"   
1100  
1101  
1102  
1103<directory "="" apache="" icons"="" local="" usr="">   
1104  
1105Options Indexes MultiViews   
1106  
1107AllowOverride None   
1108  
1109Order allow,deny   
1110  
1111Allow from all   
1112  
1113</directory>   
1114  
1115  
1116  
1117#   
1118  
1119# This should be changed to the ServerRoot/manual/. The alias provides   
1120  
1121# the manual, even if you choose to move your DocumentRoot. You may comment   
1122  
1123# this out if you do not care for the documentation.   
1124  
1125#   
1126  
1127Alias /manual "/usr/local/apache/manual"   
1128  
1129  
1130  
1131<directory "="" apache="" local="" manual"="" usr="">   
1132  
1133Options Indexes FollowSymLinks MultiViews IncludesNoExec   
1134  
1135#AddOutputFilter Includes html   
1136  
1137AllowOverride None   
1138  
1139Order allow,deny   
1140  
1141Allow from all   
1142  
1143</directory>   
1144  
1145DirectoryIndex index.html index.jsp index.xtp index.php index.php3   
1146  
1147  
1148  
1149#   
1150  
1151# ScriptAlias: This controls which directories contain server scripts.   
1152  
1153# ScriptAliases are essentially the same as Aliases, except that   
1154  
1155# documents in the realname directory are treated as applications and   
1156  
1157# run by the server when requested rather than as documents sent to the client.   
1158  
1159# The same rules about trailing "/" apply to ScriptAlias directives as to   
1160  
1161# Alias.   
1162  
1163#   
1164  
1165ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"   
1166  
1167  
1168  
1169<ifmodule mod_cgid.c="">   
1170  
1171#   
1172  
1173# Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>   
1174  
1175# for setting UNIX socket for communicating with cgid.   
1176  
1177#   
1178  
1179#Scriptsock logs/cgisock   
1180  
1181</path></ifmodule>   
1182  
1183  
1184  
1185#   
1186  
1187# "/usr/local/apache/cgi-bin" should be changed to whatever your ScriptAliased   
1188  
1189# CGI directory exists, if you have that configured.   
1190  
1191#   
1192  
1193<directory "="" apache="" cgi-bin"="" local="" usr="">   
1194  
1195AllowOverride None   
1196  
1197Options None   
1198  
1199Order allow,deny   
1200  
1201Allow from all   
1202  
1203</directory>   
1204  
1205  
1206  
1207#   
1208  
1209# Redirect allows you to tell clients about documents which used to exist in   
1210  
1211# your server's namespace, but do not anymore. This allows you to tell the   
1212  
1213# clients where to look for the relocated document.   
1214  
1215# Example:   
1216  
1217# Redirect permanent /foo http://www.andsky.com/bar   
1218  
1219  
1220  
1221#   
1222  
1223# Directives controlling the display of server-generated directory listings.   
1224  
1225#   
1226  
1227  
1228  
1229#   
1230  
1231# IndexOptions: Controls the appearance of server-generated directory   
1232  
1233# listings.   
1234  
1235#   
1236  
1237#IndexOptions FancyIndexing VersionSort   
1238  
1239  
1240  
1241#   
1242  
1243# AddIcon* directives tell the server which icon to show for different   
1244  
1245# files or filename extensions. These are only displayed for   
1246  
1247# FancyIndexed directories.   
1248  
1249#   
1250  
1251AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip   
1252  
1253  
1254  
1255AddIconByType (TXT,/icons/text.gif) text/*   
1256  
1257AddIconByType (IMG,/icons/image2.gif) image/*   
1258  
1259AddIconByType (SND,/icons/sound2.gif) audio/*   
1260  
1261AddIconByType (VID,/icons/movie.gif) video/*   
1262  
1263  
1264  
1265AddIcon /icons/binary.gif .bin .exe   
1266  
1267AddIcon /icons/binhex.gif .hqx   
1268  
1269AddIcon /icons/tar.gif .tar   
1270  
1271AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv   
1272  
1273AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip   
1274  
1275AddIcon /icons/a.gif .ps .ai .eps   
1276  
1277AddIcon /icons/layout.gif .html .shtml .htm .pdf   
1278  
1279AddIcon /icons/text.gif .txt   
1280  
1281AddIcon /icons/c.gif .c   
1282  
1283AddIcon /icons/p.gif .pl .py   
1284  
1285AddIcon /icons/f.gif .for   
1286  
1287AddIcon /icons/dvi.gif .dvi   
1288  
1289AddIcon /icons/uuencoded.gif .uu   
1290  
1291AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl   
1292  
1293AddIcon /icons/tex.gif .tex   
1294  
1295AddIcon /icons/bomb.gif core   
1296  
1297  
1298  
1299AddIcon /icons/back.gif ..   
1300  
1301AddIcon /icons/hand.right.gif README   
1302  
1303AddIcon /icons/folder.gif ^^DIRECTORY^^   
1304  
1305AddIcon /icons/blank.gif ^^BLANKICON^^   
1306  
1307  
1308  
1309#   
1310  
1311# DefaultIcon is which icon to show for files which do not have an icon   
1312  
1313# explicitly set.   
1314  
1315#   
1316  
1317DefaultIcon /icons/unknown.gif   
1318  
1319  
1320  
1321#   
1322  
1323# AddDescription allows you to place a short description after a file in   
1324  
1325# server-generated indexes. These are only displayed for FancyIndexed   
1326  
1327# directories.   
1328  
1329# Format: AddDescription "description" filename   
1330  
1331#   
1332  
1333#AddDescription "GZIP compressed document" .gz   
1334  
1335#AddDescription "tar archive" .tar   
1336  
1337#AddDescription "GZIP compressed tar archive" .tgz   
1338  
1339  
1340  
1341#   
1342  
1343# ReadmeName is the name of the README file the server will look for by   
1344  
1345# default, and append to directory listings.   
1346  
1347#   
1348  
1349# HeaderName is the name of a file which should be prepended to   
1350  
1351# directory indexes.   
1352  
1353ReadmeName README.html   
1354  
1355HeaderName HEADER.html   
1356  
1357  
1358  
1359#   
1360  
1361# IndexIgnore is a set of filenames which directory indexing should ignore   
1362  
1363# and not include in the listing. Shell-style wildcarding is permitted.   
1364  
1365#   
1366  
1367IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t   
1368  
1369  
1370  
1371#   
1372  
1373# AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress   
1374  
1375# information on the fly. Note: Not all browsers support this.   
1376  
1377# Despite the name similarity, the following Add* directives have nothing   
1378  
1379# to do with the FancyIndexing customization directives above.   
1380  
1381#   
1382  
1383AddEncoding x-compress Z   
1384  
1385AddEncoding x-gzip gz tgz   
1386  
1387  
1388  
1389#   
1390  
1391# DefaultLanguage and AddLanguage allows you to specify the language of   
1392  
1393# a document. You can then use content negotiation to give a browser a   
1394  
1395# file in a language the user can understand.   
1396  
1397#   
1398  
1399# Specify a default language. This means that all data   
1400  
1401# going out without a specific language tag (see below) will   
1402  
1403# be marked with this one. You probably do NOT want to set   
1404  
1405# this unless you are sure it is correct for all cases.   
1406  
1407#   
1408  
1409# * It is generally better to not mark a page as   
1410  
1411# * being a certain language than marking it with the wrong   
1412  
1413# * language!   
1414  
1415#   
1416  
1417# DefaultLanguage nl   
1418  
1419#   
1420  
1421# Note 1: The suffix does not have to be the same as the language   
1422  
1423# keyword --- those with documents in Polish (whose net-standard   
1424  
1425# language code is pl) may wish to use "AddLanguage pl .po" to   
1426  
1427# avoid the ambiguity with the common suffix for perl scripts.   
1428  
1429#   
1430  
1431# Note 2: The example entries below illustrate that in some cases   
1432  
1433# the two character 'Language' abbreviation is not identical to   
1434  
1435# the two character 'Country' code for its country,   
1436  
1437# E.g. 'Danmark/dk' versus 'Danish/da'.   
1438  
1439#   
1440  
1441# Note 3: In the case of 'ltz' we violate the RFC by using a three char   
1442  
1443# specifier. There is 'work in progress' to fix this and get   
1444  
1445# the reference data for rfc1766 cleaned up.   
1446  
1447#   
1448  
1449# Danish (da) - Dutch (nl) - English (en) - Estonian (et)   
1450  
1451# French (fr) - German (de) - Greek-Modern (el)   
1452  
1453# Italian (it) - Norwegian (no) - Norwegian Nynorsk (nn) - Korean (ko)   
1454  
1455# Portugese (pt) - Luxembourgeois* (ltz)   
1456  
1457# Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cz)   
1458  
1459# Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)   
1460  
1461# Russian (ru) - Croatian (hr)   
1462  
1463#   
1464  
1465AddLanguage da .dk   
1466  
1467AddLanguage nl .nl   
1468  
1469AddLanguage en .en   
1470  
1471AddLanguage et .et   
1472  
1473AddLanguage fr .fr   
1474  
1475AddLanguage de .de   
1476  
1477AddLanguage he .he   
1478  
1479AddLanguage el .el   
1480  
1481AddLanguage it .it   
1482  
1483AddLanguage ja .ja   
1484  
1485AddLanguage pl .po   
1486  
1487AddLanguage ko .ko   
1488  
1489AddLanguage pt .pt   
1490  
1491AddLanguage nn .nn   
1492  
1493AddLanguage no .no   
1494  
1495AddLanguage pt-br .pt-br   
1496  
1497AddLanguage ltz .ltz   
1498  
1499AddLanguage ca .ca   
1500  
1501AddLanguage es .es   
1502  
1503AddLanguage sv .sv   
1504  
1505AddLanguage cz .cz   
1506  
1507AddLanguage ru .ru   
1508  
1509AddLanguage tw .tw   
1510  
1511AddLanguage zh-tw .tw   
1512  
1513AddLanguage hr .hr   
1514  
1515  
1516  
1517#   
1518  
1519# LanguagePriority allows you to give precedence to some languages   
1520  
1521# in case of a tie during content negotiation.   
1522  
1523#   
1524  
1525# Just list the languages in decreasing order of preference. We have   
1526  
1527# more or less alphabetized them here. You probably want to change this.   
1528  
1529#   
1530  
1531LanguagePriority en da nl et fr de el it ja ko no pl pt pt-br ltz ca es sv tw   
1532  
1533  
1534  
1535#   
1536  
1537# ForceLanguagePriority allows you to serve a result page rather than   
1538  
1539# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)   
1540  
1541# [in case no accepted languages matched the available variants]   
1542  
1543#   
1544  
1545#ForceLanguagePriority Prefer Fallback   
1546  
1547  
1548  
1549#   
1550  
1551# Specify a default charset for all pages sent out. This is   
1552  
1553# always a good idea and opens the door for future internationalisation   
1554  
1555# of your web site, should you ever want it. Specifying it as   
1556  
1557# a default does little harm; as the standard dictates that a page   
1558  
1559# is in iso-8859-1 (latin1) unless specified otherwise i.e. you   
1560  
1561# are merely stating the obvious. There are also some security   
1562  
1563# reasons in browsers, related to javascript and URL parsing   
1564  
1565# which encourage you to always set a default char set.   
1566  
1567#   
1568  
1569AddDefaultCharset ISO-8859-1   
1570  
1571  
1572  
1573#   
1574  
1575# Commonly used filename extensions to character sets. You probably   
1576  
1577# want to avoid clashes with the language extensions, unless you   
1578  
1579# are good at carefully testing your setup after each change.   
1580  
1581# See http://www.iana.org/assignments/character-sets for the   
1582  
1583# official list of charset names and their respective RFCs.   
1584  
1585#   
1586  
1587AddCharset ISO-8859-1 .iso8859-1 .latin1   
1588  
1589AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen   
1590  
1591AddCharset ISO-8859-3 .iso8859-3 .latin3   
1592  
1593AddCharset ISO-8859-4 .iso8859-4 .latin4   
1594  
1595AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru   
1596  
1597AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb   
1598  
1599AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk   
1600  
1601AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb   
1602  
1603AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk   
1604  
1605AddCharset ISO-2022-JP .iso2022-jp .jis   
1606  
1607AddCharset ISO-2022-KR .iso2022-kr .kis   
1608  
1609AddCharset ISO-2022-CN .iso2022-cn .cis   
1610  
1611AddCharset Big5 .Big5 .big5   
1612  
1613# For russian, more than one charset is used (depends on client, mostly):   
1614  
1615AddCharset WINDOWS-1251 .cp-1251 .win-1251   
1616  
1617AddCharset CP866 .cp866   
1618  
1619AddCharset KOI8-r .koi8-r .koi8-ru   
1620  
1621AddCharset KOI8-ru .koi8-uk .ua   
1622  
1623AddCharset ISO-10646-UCS-2 .ucs2   
1624  
1625AddCharset ISO-10646-UCS-4</virtualhost></virtualhost></virtualhost></virtualhost></virtualhost></virtualhost></virtualhost></virtualhost></url:></url:>
Published At
Categories with 服务器类
Tagged with
comments powered by Disqus