由 许昂 在 12-29-2003 21:55 发表:
还是麻烦版主了!mysql+apache +php?
#/opt/apache/bin/apachectl start
Syntax error on line 840 of /opt/apache/conf/httpd.conf:
AddType requires at least two arguments,a mime type followed by one or more
file extensions
这与与此何干?
向版主报告此贴 | IP地址: 已记录
12-28-2003 19:56
许昂
☆
注册日期: May 2003
来 自:
发贴数量: 63
840行我是这样做的:
更改apache的配制文件:目的是让apache能解释php程序。
找到839行#AddType application/x-tar .tgz 这行,在下面加一行。前面不要加#号。
AddType application/x-httpd-php .php
找到下面一行在后面加上index.php,这表示网站的默认页也能够为index.php
DirectoryIndex index.html index.html.var index.php
注意:改变了http.conf后,要重启apache服务器
但还是有错误?
向版主报告此贴 | IP地址: 已记录
12-29-2003 01:38
许昂
☆
注册日期: May 2003
来 自:
发贴数量: 63
Syntax error on line 840 of /opt/apache/conf/httpd.conf:
AddType requires at least two arguments,a mime type followed by one or more file extensions
怎么办???
向版主报告此贴 | IP地址: 已记录
12-29-2003 02:25
fanf
注册日期: Dec 2003
来 自:
发贴数量: 18
不太清楚,我自己装的redhat 9,用光盘安装的php+mysql+apache ,安装完以后只要在DirectoryIndex 后边加index.php 然后重启apache就完了,我的就支持php 了
向版主报告此贴 | IP地址: 已记录
12-29-2003 03:36
许昂
☆
注册日期: May 2003
来 自:
发贴数量: 63
我是根据版主北北南提供的文章设的
我想我是不会漏什么的
这到底是什么原因啊
这与我启动的数据库:/opt/mysql/share/mysql/mysqlserver start
是否有关?(也就是我当前use 的数据库有关吗
由 许昂 在 12-29-2003 22:14 发表:
补充一点:
AddType application/x-httpd-php .php
前不加#
便是是上面的情况。
而加了#
#/opt/apache/bin/apashel start
正常
由 许昂 在 01-01-2004 14:51 发表:
?
???
由 georgek 在 01-01-2004 15:06 发表:
可以上傳你的 http.conf 來嗎?
由 许昂 在 01-04-2004 17:42 发表:
是这样的,帮忙看看谢谢
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 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 "/opt/apache" will be interpreted by the
46
47# server as "/opt/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 add a slash at the end of the directory path.
86
87#
88
89ServerRoot "/opt/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
374
375# OS/2 MPM
376
377# StartServers: Number of server processes to maintain
378
379# MinSpareThreads: Minimum number of idle threads per process,
380
381# to handle request spikes
382
383# MaxSpareThreads: Maximum number of idle threads per process
384
385# MaxRequestsPerChild: Maximum number of connections per server process
386
387<ifmodule mpmt_os2.c="">
388
389StartServers 2
390
391MinSpareThreads 5
392
393MaxSpareThreads 10
394
395MaxRequestsPerChild 0
396
397</ifmodule>
398
399
400
401#
402
403# Listen: Allows you to bind Apache to specific IP addresses and/or
404
405# ports, instead of the default. See also the <virtualhost>
406
407# directive.
408
409#
410
411# Change this to Listen on specific IP addresses as shown below to
412
413# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
414
415#
416
417#Listen 12.34.56.78:80
418
419
420
421Listen 80
422
423
424
425#
426
427# Dynamic Shared Object (DSO) Support
428
429#
430
431# To be able to use the functionality of a module which was built as a DSO you
432
433# have to place corresponding `LoadModule' lines at this location so the
434
435# directives contained in it are actually available _before_ they are used.
436
437# Statically compiled modules (those listed by `httpd -l') do not need
438
439# to be loaded here.
440
441#
442
443# Example:
444
445# LoadModule foo_module modules/mod_foo.so
446
447LoadModule php4_module modules/libphp4.so
448
449#
450
451
452
453#
454
455# ExtendedStatus controls whether Apache will generate "full" status
456
457# information (ExtendedStatus On) or just basic information (ExtendedStatus
458
459# Off) when the "server-status" handler is called. The default is Off.
460
461#
462
463#ExtendedStatus On
464
465
466
467### Section 2: 'Main' server configuration
468
469#
470
471# The directives in this section set up the values used by the 'main'
472
473# server, which responds to any requests that aren't handled by a
474
475# <virtualhost> definition. These values also provide defaults for
476
477# any <virtualhost> containers you may define later in the file.
478
479#
480
481# All of these directives may appear inside <virtualhost> containers,
482
483# in which case these default settings will be overridden for the
484
485# virtual host being defined.
486
487#
488
489
490
491<ifmodule !mpm_winnt.c="">
492<ifmodule !mpm_netware.c="">
493
494#
495
496# If you wish httpd to run as a different user or group, you must run
497
498# httpd as root initially and it will switch.
499
500#
501
502# User/Group: The name (or #number) of the user/group to run httpd as.
503
504# . On SCO (ODT 3) use "User nouser" and "Group nogroup".
505
506# . On HPUX you may not be able to use shared memory as nobody, and the
507
508# suggested workaround is to create a user www and use that user.
509
510# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
511
512# when the value of (unsigned)Group is above 60000;
513
514# don't use Group #-1 on these systems!
515
516#
517
518User nobody
519
520Group #-1
521
522</ifmodule>
523</ifmodule>
524
525
526
527#
528
529# ServerAdmin: Your address, where problems with the server should be
530
531# e-mailed. This address appears on some server-generated pages, such
532
533# as error documents. e.g. [email protected]
534
535#
536
537ServerAdmin [email protected]
538
539
540
541#
542
543# ServerName gives the name and port that the server uses to identify itself.
544
545# This can often be determined automatically, but we recommend you specify
546
547# it explicitly to prevent problems during startup.
548
549#
550
551# If this is not set to valid DNS name for your host, server-generated
552
553# redirections will not work. See also the UseCanonicalName directive.
554
555#
556
557# If your host doesn't have a registered DNS name, enter its IP address here.
558
559# You will have to access it by its address anyway, and this will make
560
561# redirections work in a sensible way.
562
563#
564
565ServerName 127.0.0.1:80
566
567
568
569#
570
571# UseCanonicalName: Determines how Apache constructs self-referencing
572
573# URLs and the SERVER_NAME and SERVER_PORT variables.
574
575# When set "Off", Apache will use the Hostname and Port supplied
576
577# by the client. When set "On", Apache will use the value of the
578
579# ServerName directive.
580
581#
582
583UseCanonicalName Off
584
585
586
587#
588
589# DocumentRoot: The directory out of which you will serve your
590
591# documents. By default, all requests are taken from this directory, but
592
593# symbolic links and aliases may be used to point to other locations.
594
595#
596
597DocumentRoot "/var/home/www"
598
599
600
601#
602
603# Each directory to which Apache has access can be configured with respect
604
605# to which services and features are allowed and/or disabled in that
606
607# directory (and its subdirectories).
608
609#
610
611# First, we configure the "default" to be a very restrictive set of
612
613# features.
614
615#
616
617<directory></directory>
618
619Options FollowSymLinks
620
621AllowOverride None
622
623
624
625
626
627#
628
629# Note that from this point forward you must specifically allow
630
631# particular features to be enabled - so if something's not working as
632
633# you might expect, make sure that you have specifically enabled it
634
635# below.
636
637#
638
639
640
641#
642
643# This should be changed to whatever you set DocumentRoot to.
644
645#
646
647<directory "="" home="" var="" www"="">
648
649
650
651#
652
653# Possible values for the Options directive are "None", "All",
654
655# or any combination of:
656
657# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
658
659#
660
661# Note that "MultiViews" must be named *explicitly* --- "Options All"
662
663# doesn't give it to you.
664
665#
666
667# The Options directive is both complicated and important. Please see
668
669# http://httpd.apache.org/docs-2.0/mod/core.html#options
670
671# for more information.
672
673#
674
675Options Indexes FollowSymLinks
676
677
678
679#
680
681# AllowOverride controls what directives may be placed in .htaccess files.
682
683# It can be "All", "None", or any combination of the keywords:
684
685# Options FileInfo AuthConfig Limit
686
687#
688
689AllowOverride None
690
691
692
693#
694
695# Controls who can get stuff from this server.
696
697#
698
699Order allow,deny
700
701Allow from all
702
703
704
705</directory>
706
707
708
709#
710
711# UserDir: The name of the directory that is appended onto a user's home
712
713# directory if a ~user request is received.
714
715#
716
717UserDir public_html
718
719
720
721#
722
723# Control access to UserDir directories. The following is an example
724
725# for a site where these directories are restricted to read-only.
726
727#
728
729#<directory *="" home="" public_html="">
730
731# AllowOverride FileInfo AuthConfig Limit Indexes
732
733# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
734
735# <limit get="" options="" post="" propfind="">
736
737# Order allow,deny
738
739# Allow from all
740
741# </limit>
742
743# <limitexcept get="" options="" post="" propfind="">
744
745# Order deny,allow
746
747# Deny from all
748
749# </limitexcept>
750
751#</directory>
752
753
754
755#
756
757# DirectoryIndex: sets the file that Apache will serve if a directory
758
759# is requested.
760
761#
762
763# The index.html.var file (a type-map) is used to deliver content-
764
765# negotiated documents. The MultiViews Option can be used for the
766
767# same purpose, but it is much slower.
768
769#
770
771DirectoryIndex index.html index.html.var index.php
772
773
774
775#
776
777# AccessFileName: The name of the file to look for in each directory
778
779# for additional configuration directives. See also the AllowOverride
780
781# directive.
782
783#
784
785AccessFileName .htaccess
786
787
788
789#
790
791# The following lines prevent .htaccess and .htpasswd files from being
792
793# viewed by Web clients.
794
795#
796
797<files "^\\.ht"="" ~="">
798
799Order allow,deny
800
801Deny from all
802
803</files>
804
805
806
807#
808
809# TypesConfig describes where the mime.types file (or equivalent) is
810
811# to be found.
812
813#
814
815TypesConfig conf/mime.types
816
817
818
819#
820
821# DefaultType is the default MIME type the server will use for a document
822
823# if it cannot otherwise determine one, such as from filename extensions.
824
825# If your server contains mostly text or HTML documents, "text/plain" is
826
827# a good value. If most of your content is binary, such as applications
828
829# or images, you may want to use "application/octet-stream" instead to
830
831# keep browsers from trying to display binary files as though they are
832
833# text.
834
835#
836
837DefaultType text/plain
838
839
840
841#
842
843# The mod_mime_magic module allows the server to use various hints from the
844
845# contents of the file itself to determine its type. The MIMEMagicFile
846
847# directive tells the module where the hint definitions are located.
848
849#
850
851<ifmodule mod_mime_magic.c="">
852
853MIMEMagicFile conf/magic
854
855</ifmodule>
856
857
858
859#
860
861# HostnameLookups: Log the names of clients or just their IP addresses
862
863# e.g., www.apache.org (on) or 204.62.129.132 (off).
864
865# The default is off because it'd be overall better for the net if people
866
867# had to knowingly turn this feature on, since enabling it means that
868
869# each client request will result in AT LEAST one lookup request to the
870
871# nameserver.
872
873#
874
875HostnameLookups Off
876
877
878
879#
880
881# EnableMMAP: Control whether memory-mapping is used to deliver
882
883# files (assuming that the underlying OS supports it).
884
885# The default is on; turn this off if you serve from NFS-mounted
886
887# filesystems. On some systems, turning it off (regardless of
888
889# filesystem) can improve performance; for details, please see
890
891# http://httpd.apache.org/docs-2.0/mo...html#enablemmap
892
893#
894
895#EnableMMAP off
896
897
898
899#
900
901# EnableSendfile: Control whether the sendfile kernel support is
902
903# used to deliver files (assuming that the OS supports it).
904
905# The default is on; turn this off if you serve from NFS-mounted
906
907# filesystems. Please see
908
909# http://httpd.apache.org/docs-2.0/mo...#enablesendfile
910
911#
912
913#EnableSendfile off
914
915
916
917#
918
919# ErrorLog: The location of the error log file.
920
921# If you do not specify an ErrorLog directive within a <virtualhost>
922
923# container, error messages relating to that virtual host will be
924
925# logged here. If you *do* define an error logfile for a <virtualhost>
926
927# container, that host's errors will be logged there and not here.
928
929#
930
931ErrorLog logs/error_log
932
933
934
935#
936
937# LogLevel: Control the number of messages logged to the error_log.
938
939# Possible values include: debug, info, notice, warn, error, crit,
940
941# alert, emerg.
942
943#
944
945LogLevel warn
946
947
948
949#
950
951# The following directives define some format nicknames for use with
952
953# a CustomLog directive (see below).
954
955#
956
957LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
958
959LogFormat "%h %l %u %t \"%r\" %>s %b" common
960
961LogFormat "%{Referer}i -> %U" referer
962
963LogFormat "%{User-agent}i" agent
964
965
966
967# You need to enable mod_logio.c to use %I and %O
968
969#LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
970
971
972
973#
974
975# The location and format of the access logfile (Common Logfile Format).
976
977# If you do not define any access logfiles within a <virtualhost>
978
979# container, they will be logged here. Contrariwise, if you *do*
980
981# define per-<virtualhost> access logfiles, transactions will be
982
983# logged therein and *not* in this file.
984
985#
986
987CustomLog logs/access_log common
988
989
990
991#
992
993# If you would like to have agent and referer logfiles, uncomment the
994
995# following directives.
996
997#
998
999#CustomLog logs/referer_log referer
1000
1001#CustomLog logs/agent_log agent
1002
1003
1004
1005#
1006
1007# If you prefer a single logfile with access, agent, and referer information
1008
1009# (Combined Logfile Format) you can use the following directive.
1010
1011#
1012
1013#CustomLog logs/access_log combined
1014
1015
1016
1017#
1018
1019# ServerTokens
1020
1021# This directive configures what you return as the Server HTTP response
1022
1023# Header. The default is 'Full' which sends information about the OS-Type
1024
1025# and compiled in modules.
1026
1027# Set to one of: Full | OS | Minor | Minimal | Major | Prod
1028
1029# where Full conveys the most information, and Prod the least.
1030
1031#
1032
1033ServerTokens Full
1034
1035
1036
1037#
1038
1039# Optionally add a line containing the server version and virtual host
1040
1041# name to server-generated pages (internal error documents, FTP directory
1042
1043# listings, mod_status and mod_info output etc., but not CGI generated
1044
1045# documents or custom error documents).
1046
1047# Set to "EMail" to also include a mailto: link to the ServerAdmin.
1048
1049# Set to one of: On | Off | EMail
1050
1051#
1052
1053ServerSignature On
1054
1055
1056
1057#
1058
1059# Aliases: Add here as many aliases as you need (with no limit). The format is
1060
1061# Alias fakename realname
1062
1063#
1064
1065# Note that if you include a trailing / on fakename then the server will
1066
1067# require it to be present in the URL. So "/icons" isn't aliased in this
1068
1069# example, only "/icons/". If the fakename is slash-terminated, then the
1070
1071# realname must also be slash terminated, and if the fakename omits the
1072
1073# trailing slash, the realname must also omit it.
1074
1075#
1076
1077# We include the /icons/ alias for FancyIndexed directory listings. If you
1078
1079# do not use FancyIndexing, you may comment this out.
1080
1081#
1082
1083Alias /icons/ "/opt/apache/icons/"
1084
1085
1086
1087<directory "="" apache="" icons"="" opt="">
1088
1089Options Indexes MultiViews
1090
1091AllowOverride None
1092
1093Order allow,deny
1094
1095Allow from all
1096
1097</directory>
1098
1099
1100
1101#
1102
1103# This should be changed to the ServerRoot/manual/. The alias provides
1104
1105# the manual, even if you choose to move your DocumentRoot. You may comment
1106
1107# this out if you do not care for the documentation.
1108
1109#
1110
1111AliasMatch ^/manual(?:/(?:de|en|fr|ja|ko|ru))?(/.*)?$ "/opt/apache/manual$1"
1112
1113
1114
1115<directory "="" apache="" manual"="" opt="">
1116
1117Options Indexes
1118
1119AllowOverride None
1120
1121Order allow,deny
1122
1123Allow from all
1124
1125
1126
1127<files *.html="">
1128
1129SetHandler type-map
1130
1131</files>
1132
1133
1134
1135SetEnvIf Request_URI ^/manual/de/ prefer-language=de
1136
1137SetEnvIf Request_URI ^/manual/en/ prefer-language=en
1138
1139SetEnvIf Request_URI ^/manual/fr/ prefer-language=fr
1140
1141SetEnvIf Request_URI ^/manual/ja/ prefer-language=ja
1142
1143SetEnvIf Request_URI ^/manual/ko/ prefer-language=ko
1144
1145SetEnvIf Request_URI ^/manual/ru/ prefer-language=ru
1146
1147RedirectMatch 301 ^/manual(?:/(de|en|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2
1148
1149</directory>
1150
1151
1152
1153#
1154
1155# ScriptAlias: This controls which directories contain server scripts.
1156
1157# ScriptAliases are essentially the same as Aliases, except that
1158
1159# documents in the realname directory are treated as applications and
1160
1161# run by the server when requested rather than as documents sent to the client.
1162
1163# The same rules about trailing "/" apply to ScriptAlias directives as to
1164
1165# Alias.
1166
1167#
1168
1169ScriptAlias /cgi-bin/ "/opt/apache/cgi-bin/"
1170
1171
1172
1173<ifmodule mod_cgid.c="">
1174
1175#
1176
1177# Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>
1178
1179# for setting UNIX socket for communicating with cgid.
1180
1181#
1182
1183#Scriptsock logs/cgisock
1184
1185</path></ifmodule>
1186
1187
1188
1189#
1190
1191# "/opt/apache/cgi-bin" should be changed to whatever your ScriptAliased
1192
1193# CGI directory exists, if you have that configured.
1194
1195#
1196
1197<directory "="" apache="" cgi-bin"="" opt="">
1198
1199AllowOverride None
1200
1201Options None
1202
1203Order allow,deny
1204
1205Allow from all
1206
1207</directory>
1208
1209
1210
1211#
1212
1213# Redirect allows you to tell clients about documents which used to exist in
1214
1215# your server's namespace, but do not anymore. This allows you to tell the
1216
1217# clients where to look for the relocated document.
1218
1219# Example:
1220
1221# Redirect permanent /foo http://www.andsky.com/bar
1222
1223
1224
1225#
1226
1227# Directives controlling the display of server-generated directory listings.
1228
1229#
1230
1231
1232
1233#
1234
1235# IndexOptions: Controls the appearance of server-generated directory
1236
1237# listings.
1238
1239#
1240
1241IndexOptions FancyIndexing VersionSort
1242
1243
1244
1245#
1246
1247# AddIcon* directives tell the server which icon to show for different
1248
1249# files or filename extensions. These are only displayed for
1250
1251# FancyIndexed directories.
1252
1253#
1254
1255AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
1256
1257
1258
1259AddIconByType (TXT,/icons/text.gif) text/*
1260
1261AddIconByType (IMG,/icons/image2.gif) image/*
1262
1263AddIconByType (SND,/icons/sound2.gif) audio/*
1264
1265AddIconByType (VID,/icons/movie.gif) video/*
1266
1267
1268
1269AddIcon /icons/binary.gif .bin .exe
1270
1271AddIcon /icons/binhex.gif .hqx
1272
1273AddIcon /icons/tar.gif .tar
1274
1275AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
1276
1277AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
1278
1279AddIcon /icons/a.gif .ps .ai .eps
1280
1281AddIcon /icons/layout.gif .html .shtml .htm .pdf
1282
1283AddIcon /icons/text.gif .txt
1284
1285AddIcon /icons/c.gif .c
1286
1287AddIcon /icons/p.gif .pl .py
1288
1289AddIcon /icons/f.gif .for
1290
1291AddIcon /icons/dvi.gif .dvi
1292
1293AddIcon /icons/uuencoded.gif .uu
1294
1295AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
1296
1297AddIcon /icons/tex.gif .tex
1298
1299AddIcon /icons/bomb.gif core
1300
1301
1302
1303AddIcon /icons/back.gif ..
1304
1305AddIcon /icons/hand.right.gif README
1306
1307AddIcon /icons/folder.gif ^^DIRECTORY^^
1308
1309AddIcon /icons/blank.gif ^^BLANKICON^^
1310
1311
1312
1313#
1314
1315# DefaultIcon is which icon to show for files which do not have an icon
1316
1317# explicitly set.
1318
1319#
1320
1321DefaultIcon /icons/unknown.gif
1322
1323
1324
1325#
1326
1327# AddDescription allows you to place a short description after a file in
1328
1329# server-generated indexes. These are only displayed for FancyIndexed
1330
1331# directories.
1332
1333# Format: AddDescription "description" filename
1334
1335#
1336
1337#AddDescription "GZIP compressed document" .gz
1338
1339#AddDescription "tar archive" .tar
1340
1341#AddDescription "GZIP compressed tar archive" .tgz
1342
1343
1344
1345#
1346
1347# ReadmeName is the name of the README file the server will look for by
1348
1349# default, and append to directory listings.
1350
1351#
1352
1353# HeaderName is the name of a file which should be prepended to
1354
1355# directory indexes.
1356
1357ReadmeName README.html
1358
1359HeaderName HEADER.html
1360
1361
1362
1363#
1364
1365# IndexIgnore is a set of filenames which directory indexing should ignore
1366
1367# and not include in the listing. Shell-style wildcarding is permitted.
1368
1369#
1370
1371IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
1372
1373
1374
1375#
1376
1377# DefaultLanguage and AddLanguage allows you to specify the language of
1378
1379# a document. You can then use content negotiation to give a browser a
1380
1381# file in a language the user can understand.
1382
1383#
1384
1385# Specify a default language. This means that all data
1386
1387# going out without a specific language tag (see below) will
1388
1389# be marked with this one. You probably do want to set
1390
1391# this unless you are sure it is correct for all cases.
1392
1393#
1394
1395# * It is generally better to not mark a page as
1396
1397# * being a certain language than marking it with the wrong
1398
1399# * language!
1400
1401#
1402
1403# DefaultLanguage nl
1404
1405#
1406
1407# Note 1: The suffix does not have to be the same as the language
1408
1409# keyword --- those with documents in Polish (whose net-standard
1410
1411# language code is pl) may wish to use "AddLanguage pl .po" to
1412
1413# avoid the ambiguity with the common suffix for perl scripts.
1414
1415#
1416
1417# Note 2: The example entries below illustrate that in some cases
1418
1419# the two character 'Language' abbreviation is not identical to
1420
1421# the two character 'Country' code for its country,
1422
1423# E.g. 'Danmark/dk' versus 'Danish/da'.
1424
1425#
1426
1427# Note 3: In the case of 'ltz' we violate the RFC by using a three char
1428
1429# specifier. There is 'work in progress' to fix this and get
1430
1431# the reference data for rfc1766 cleaned up.
1432
1433#
1434
1435# Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
1436
1437# English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
1438
1439# Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
1440
1441# Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
1442
1443# Norwegian (no) - Polish (pl) - Portugese (pt)
1444
1445# Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
1446
1447# Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
1448
1449#
1450
1451AddLanguage ca .ca
1452
1453AddLanguage cs .cz .cs
1454
1455AddLanguage da .dk
1456
1457AddLanguage de .de
1458
1459AddLanguage el .el
1460
1461AddLanguage en .en
1462
1463AddLanguage eo .eo
1464
1465AddLanguage es .es
1466
1467AddLanguage et .et
1468
1469AddLanguage fr .fr
1470
1471AddLanguage he .he
1472
1473AddLanguage hr .hr
1474
1475AddLanguage it .it
1476
1477AddLanguage ja .ja
1478
1479AddLanguage ko .ko
1480
1481AddLanguage ltz .ltz
1482
1483AddLanguage nl .nl
1484
1485AddLanguage nn .nn
1486
1487AddLanguage no .no
1488
1489AddLanguage pl .po
1490
1491AddLanguage pt .pt
1492
1493AddLanguage pt-BR .pt-br
1494
1495AddLanguage ru .ru
1496
1497AddLanguage sv .sv
1498
1499AddLanguage zh-CN .zh-cn
1500
1501AddLanguage zh-TW .zh-tw
1502
1503
1504
1505#
1506
1507# LanguagePriority allows you to give precedence to some languages
1508
1509# in case of a tie during content negotiation.
1510
1511#
1512
1513# Just list the languages in decreasing order of preference. We have
1514
1515# more or less alphabetized them here. You probably want to change this.
1516
1517#
1518
1519LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
1520
1521
1522
1523#
1524
1525# ForceLanguagePriority allows you to serve a result page rather than
1526
1527# MULTIPLE CHOICES (Prefer) [in case of a tie] or ACCEPTABLE (Fallback)
1528
1529# [in case no accepted languages matched the available variants]
1530
1531#
1532
1533ForceLanguagePriority Prefer Fallback
1534
1535
1536
1537#
1538
1539# Specify a default charset for all pages sent out. This is
1540
1541# always a good idea and opens the door for future internationalisation
1542
1543# of your web site, should you ever want it. Specifying it as
1544
1545# a default does little harm; as the standard dictates that a page
1546
1547# is in iso-8859-1 (latin1) unless specified otherwise i.e. you
1548
1549# are merely stating the obvious. There are also some s</virtualhost></virtualhost></virtualhost></virtualhost></virtualhost></virtualhost></virtualhost></virtualhost></url:></url:>