由 ruochen 在 07-08-2003 18:43 发表:
redhat下建立虚拟主机的问题!~
我在redhat下建立了两个用户和两个组作为测试用!!~
1:用户wya1 属于足web
2:用户wyb1 属于足web1
想实现的功能如下:
用户wy是系统用户,可以远程登录,家目录是/home/wya1,支持apache+php+mysql+vsftp 要求可以ssh远程登录.
用户wy1是虚拟用户,家目录是/var/www(不清楚是在此目录还是在/var/www/html下建立用户家目录???)也支持apache+php+mysql+vsftp,但是不能远程登录(通过修改passwd已经实现)!!
还有那个默认的家目录是/var/www/html,是吗????
(以上这些基本配置已经完成)
以后维护也分别是这样实现:
添加wya2 wya3 .......属于组web,实现和wya1一样的功能!~
添加wyb2 wyb3 .......属于组web1,实现和wyb1一样的功能!~
谢谢兄弟们!!~
我还是个linux的菜鸟,对配置服务器没有什么经验!~
望指教!~~~
由 ruochen 在 07-08-2003 20:48 发表:
http.conf文件如下!!
(系统是redhat9 apache版本是2.0)
httpd.conf - configuration for the Apache web server
Generated automatically... if you edit manually, the changes will be lost
the next time you run "apacheconfig".
Section 1: Global Environment
The directives in this section affect the overall operation of Apache,
such as the number of concurrent requests it can handle or where it
can find its configuration files.
Don't give away too much information about all the subcomponents
we are running. Comment out this line if you don't mind remote sites
finding out what major optional modules you are running
ServerTokens OS
ServerRoot: The top of the directory tree under which the server's
configuration, error, and log files are kept.
NOTE! If you intend to place this on an NFS (or otherwise network)
mounted filesystem then please read the LockFile documentation
(available at
1<url: core.html#lockfile="" docs-2.0="" http:="" httpd.apache.org="" mod=""> );
2
3# you will save yourself a lot of trouble.
4
5#
6
7# Do NOT add a slash at the end of the directory path.
8
9#
10
11ServerRoot "/etc/httpd"
12
13
14
15#
16
17# ScoreBoardFile: File used to store internal server process information.
18
19# If unspecified (the default), the scoreboard will be stored in an
20
21# anonymous shared memory segment, and will be unavailable to third-party
22
23# applications.
24
25# If specified, ensure that no two invocations of Apache share the same
26
27# scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.
28
29#
30
31#ScoreBoardFile run/httpd.scoreboard
32
33
34
35#
36
37# PidFile: The file in which the server should record its process
38
39# identification number when it starts.
40
41#
42
43PidFile "/var/run/httpd.pid"
44
45
46
47#
48
49# Timeout: The number of seconds before receives and sends time out.
50
51#
52
53TimeOut 300
54
55
56
57#
58
59# KeepAlive: Whether or not to allow persistent connections (more than
60
61# one request per connection). Set to "Off" to deactivate.
62
63#
64
65KeepAlive false
66
67
68
69#
70
71# MaxKeepAliveRequests: The maximum number of requests to allow
72
73# during a persistent connection. Set to 0 to allow an unlimited amount.
74
75# We recommend you leave this number high, for maximum performance.
76
77#
78
79MaxKeepAliveRequests 100
80
81
82
83#
84
85# KeepAliveTimeout: Number of seconds to wait for the next request from the
86
87# same client on the same connection.
88
89#
90
91KeepAliveTimeout 15
92
93
94
95##
96
97## Server-Pool Size Regulation (MPM specific)
98
99##
100
101
102
103# prefork MPM
104
105# StartServers: number of server processes to start
106
107# MinSpareServers: minimum number of server processes which are kept spare
108
109# MaxSpareServers: maximum number of server processes which are kept spare
110
111# MaxClients: maximum number of server processes allowed to start
112
113# MaxRequestsPerChild: maximum number of requests a server process serves
114
115<ifmodule prefork.c="">
116
117StartServers 8
118
119MinSpareServers 5
120
121MaxSpareServers 20
122
123MaxClients 150
124
125MaxRequestsPerChild 100
126
127</ifmodule>
128
129
130
131# worker MPM
132
133# StartServers: initial number of server processes to start
134
135# MaxClients: maximum number of simultaneous client connections
136
137# MinSpareThreads: minimum number of worker threads which are kept spare
138
139# MaxSpareThreads: maximum number of worker threads which are kept spare
140
141# ThreadsPerChild: constant number of worker threads in each server process
142
143# MaxRequestsPerChild: maximum number of requests a server process serves
144
145<ifmodule worker.c="">
146
147StartServers 2
148
149MaxClients 150
150
151MinSpareThreads 25
152
153MaxSpareThreads 75
154
155ThreadsPerChild 25
156
157MaxRequestsPerChild 0
158
159</ifmodule>
160
161
162
163# perchild MPM
164
165# NumServers: constant number of server processes
166
167# StartThreads: initial number of worker threads in each server process
168
169# MinSpareThreads: minimum number of worker threads which are kept spare
170
171# MaxSpareThreads: maximum number of worker threads which are kept spare
172
173# MaxThreadsPerChild: maximum number of worker threads in each server process
174
175# MaxRequestsPerChild: maximum number of connections per server process
176
177<ifmodule perchild.c="">
178
179NumServers 5
180
181StartThreads 5
182
183MinSpareThreads 5
184
185MaxSpareThreads 10
186
187MaxThreadsPerChild 20
188
189MaxRequestsPerChild 0
190
191</ifmodule>
192
193
194
195#
196
197# Listen: Allows you to bind Apache to specific IP addresses and/or
198
199# ports, in addition to the default. See also the <virtualhost>
200
201# directive.
202
203#
204
205# Change this to Listen on specific IP addresses as shown below to
206
207# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
208
209#
210
211#Listen 12.34.56.78:80
212
213Listen *:80
214
215
216
217
218
219#
220
221# Load config files from the config directory "/etc/httpd/conf.d".
222
223#
224
225Include conf.d/*.conf
226
227
228
229#
230
231# Dynamic Shared Object (DSO) Support
232
233#
234
235# To be able to use the functionality of a module which was built as a DSO you
236
237# have to place corresponding `LoadModule' lines at this location so the
238
239# directives contained in it are actually available _before_ they are used.
240
241# Statically compiled modules (those listed by `httpd -l') do not need
242
243# to be loaded here.
244
245#
246
247# Example:
248
249# LoadModule foo_module modules/mod_foo.so
250
251#
252
253LoadModule access_module modules/mod_access.so
254
255LoadModule auth_module modules/mod_auth.so
256
257LoadModule auth_anon_module modules/mod_auth_anon.so
258
259LoadModule auth_dbm_module modules/mod_auth_dbm.so
260
261LoadModule auth_digest_module modules/mod_auth_digest.so
262
263LoadModule include_module modules/mod_include.so
264
265LoadModule log_config_module modules/mod_log_config.so
266
267LoadModule env_module modules/mod_env.so
268
269LoadModule mime_magic_module modules/mod_mime_magic.so
270
271LoadModule cern_meta_module modules/mod_cern_meta.so
272
273LoadModule expires_module modules/mod_expires.so
274
275LoadModule headers_module modules/mod_headers.so
276
277LoadModule usertrack_module modules/mod_usertrack.so
278
279LoadModule unique_id_module modules/mod_unique_id.so
280
281LoadModule setenvif_module modules/mod_setenvif.so
282
283LoadModule mime_module modules/mod_mime.so
284
285LoadModule dav_module modules/mod_dav.so
286
287LoadModule status_module modules/mod_status.so
288
289LoadModule autoindex_module modules/mod_autoindex.so
290
291LoadModule asis_module modules/mod_asis.so
292
293LoadModule info_module modules/mod_info.so
294
295LoadModule cgi_module modules/mod_cgi.so
296
297LoadModule dav_fs_module modules/mod_dav_fs.so
298
299LoadModule vhost_alias_module modules/mod_vhost_alias.so
300
301LoadModule negotiation_module modules/mod_negotiation.so
302
303LoadModule dir_module modules/mod_dir.so
304
305LoadModule imap_module modules/mod_imap.so
306
307LoadModule actions_module modules/mod_actions.so
308
309LoadModule speling_module modules/mod_speling.so
310
311LoadModule userdir_module modules/mod_userdir.so
312
313LoadModule alias_module modules/mod_alias.so
314
315LoadModule rewrite_module modules/mod_rewrite.so
316
317
318
319#
320
321# ExtendedStatus controls whether Apache will generate "full" status
322
323# information (ExtendedStatus On) or just basic information (ExtendedStatus
324
325# Off) when the "server-status" handler is called. The default is Off.
326
327#
328
329#ExtendedStatus On
330
331
332
333### Section 2: 'Main' server configuration
334
335#
336
337# The directives in this section set up the values used by the 'main'
338
339# server, which responds to any requests that aren't handled by a
340
341# <virtualhost> definition. These values also provide defaults for
342
343# any <virtualhost> containers you may define later in the file.
344
345#
346
347# All of these directives may appear inside <virtualhost> containers,
348
349# in which case these default settings will be overridden for the
350
351# virtual host being defined.
352
353#
354
355
356
357#
358
359# If you wish httpd to run as a different user or group, you must run
360
361# httpd as root initially and it will switch.
362
363#
364
365# User/Group: The name (or #number) of the user/group to run httpd as.
366
367# . On SCO (ODT 3) use "User nouser" and "Group nogroup".
368
369# . On HPUX you may not be able to use shared memory as nobody, and the
370
371# suggested workaround is to create a user www and use that user.
372
373# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
374
375# when the value of (unsigned)Group is above 60000;
376
377# don't use Group #-1 on these systems!
378
379#
380
381User apache
382
383Group apache
384
385
386
387#
388
389# ServerAdmin: Your address, where problems with the server should be
390
391# e-mailed. This address appears on some server-generated pages, such
392
393# as error documents. e.g. [email protected]
394
395#
396
397ServerAdmin root@localhost
398
399
400
401#
402
403# ServerName gives the name and port that the server uses to identify itself.
404
405# This can often be determined automatically, but we recommend you specify
406
407# it explicitly to prevent problems during startup.
408
409#
410
411# If this is not set to valid DNS name for your host, server-generated
412
413# redirections will not work. See also the UseCanonicalName directive.
414
415#
416
417# If your host doesn't have a registered DNS name, enter its IP address here.
418
419# You will have to access it by its address anyway, and this will make
420
421# redirections work in a sensible way.
422
423#
424
425ServerName ruochen
426
427
428
429#
430
431# UseCanonicalName: Determines how Apache constructs self-referencing
432
433# URLs and the SERVER_NAME and SERVER_PORT variables.
434
435# When set "Off", Apache will use the Hostname and Port supplied
436
437# by the client. When set "On", Apache will use the value of the
438
439# ServerName directive.
440
441#
442
443UseCanonicalName on
444
445
446
447#
448
449# DocumentRoot: The directory out of which you will serve your
450
451# documents. By default, all requests are taken from this directory, but
452
453# symbolic links and aliases may be used to point to other locations.
454
455#
456
457DocumentRoot "/var/www/html"
458
459
460
461#
462
463# Disable autoindex for the root directory, and present a
464
465# default Welcome page if no other index page is present.
466
467#
468
469<locationmatch "^="" $"="">
470
471Options -Indexes
472
473ErrorDocument 403 /error/noindex.html
474
475</locationmatch>
476
477
478
479#
480
481# UserDir: The name of the directory that is appended onto a user's home
482
483# directory if a ~user request is received.
484
485#
486
487# The path to the end user account 'public_html' directory must be
488
489# accessible to the webserver userid. This usually means that ~userid
490
491# must have permissions of 711, ~userid/public_html must have permissions
492
493# of 755, and documents contained therein must be world-readable.
494
495# Otherwise, the client will only receive a "403 Forbidden" message.
496
497#
498
499# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
500
501#
502
503<ifmodule mod_userdir.c="">
504
505#
506
507# UserDir is disabled by default since it can confirm the presence
508
509# of a username on the system (depending on home directory
510
511# permissions).
512
513#
514
515UserDir "disable"
516
517
518
519#
520
521# To enable requests to /~user/ to serve the user's public_html
522
523# directory, use this directive instead of "UserDir disable":
524
525#
526
527#UserDir public_html
528
529
530
531</ifmodule>
532
533
534
535#
536
537# DirectoryIndex: sets the file that Apache will serve if a directory
538
539# is requested.
540
541#
542
543# The index.html.var file (a type-map) is used to deliver content-
544
545# negotiated documents. The MultiViews Option can be used for the
546
547# same purpose, but it is much slower.
548
549#
550
551DirectoryIndex
552
553
554
555#
556
557# AccessFileName: The name of the file to look for in each directory
558
559# for access control information. See also the AllowOverride directive.
560
561#
562
563AccessFileName .htaccess
564
565
566
567#
568
569# The following lines prevent .htaccess and .htpasswd files from being
570
571# viewed by Web clients.
572
573#
574
575<files "^\\.ht"="" ~="">
576
577Order allow,deny
578
579Deny from all
580
581</files>
582
583
584
585#
586
587# TypesConfig describes where the mime.types file (or equivalent) is
588
589# to be found.
590
591#
592
593TypesConfig "/etc/mime.types"
594
595
596
597#
598
599# DefaultType is the default MIME type the server will use for a document
600
601# if it cannot otherwise determine one, such as from filename extensions.
602
603# If your server contains mostly text or HTML documents, "text/plain" is
604
605# a good value. If most of your content is binary, such as applications
606
607# or images, you may want to use "application/octet-stream" instead to
608
609# keep browsers from trying to display binary files as though they are
610
611# text.
612
613#
614
615DefaultType text/plain
616
617
618
619#
620
621# The mod_mime_magic module allows the server to use various hints from the
622
623# contents of the file itself to determine its type. The MIMEMagicFile
624
625# directive tells the module where the hint definitions are located.
626
627#
628
629<ifmodule mod_mime_magic.c="">
630
631# MIMEMagicFile /usr/share/magic.mime
632
633MIMEMagicFile conf/magic
634
635</ifmodule>
636
637
638
639#
640
641# HostnameLookups: Log the names of clients or just their IP addresses
642
643# e.g., www.apache.org (on) or 204.62.129.132 (off).
644
645# The default is off because it'd be overall better for the net if people
646
647# had to knowingly turn this feature on, since enabling it means that
648
649# each client request will result in AT LEAST one lookup request to the
650
651# nameserver.
652
653#
654
655HostNameLookups Off
656
657
658
659#
660
661# ErrorLog: The location of the error log file.
662
663# If you do not specify an ErrorLog directive within a <virtualhost>
664
665# container, error messages relating to that virtual host will be
666
667# logged here. If you *do* define an error logfile for a <virtualhost>
668
669# container, that host's errors will be logged there and not here.
670
671#
672
673ErrorLog "/var/log/httpd/error_log"
674
675
676
677#
678
679# LogLevel: Control the number of messages logged to the error_log.
680
681# Possible values include: debug, info, notice, warn, error, crit,
682
683# alert, emerg.
684
685#
686
687LogLevel warn
688
689
690
691#
692
693# The following directives define some format nicknames for use with
694
695# a CustomLog directive (see below).
696
697#
698
699LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
700
701LogFormat "%h %l %u %t \"%r\" %>s %b" common
702
703LogFormat "%{Referer}i -> %U" referer
704
705LogFormat "%{User-agent}i" agent
706
707
708
709
710
711#
712
713# The location and format of the access logfile (Common Logfile Format).
714
715# If you do not define any access logfiles within a <virtualhost>
716
717# container, they will be logged here. Contrariwise, if you *do*
718
719# define per-<virtualhost> access logfiles, transactions will be
720
721# logged therein and *not* in this file.
722
723#
724
725# CustomLog logs/access_log common
726
727CustomLog logs/access_log combined
728
729
730
731#
732
733# If you would like to have agent and referer logfiles, uncomment the
734
735# following directives.
736
737#
738
739#CustomLog logs/referer_log referer
740
741#CustomLog logs/agent_log agent
742
743
744
745#
746
747# If you prefer a single logfile with access, agent, and referer information
748
749# (Combined Logfile Format) you can use the following directive.
750
751#
752
753#CustomLog logs/access_log combined
754
755
756
757#
758
759# Optionally add a line containing the server version and virtual host
760
761# name to server-generated pages (error documents, FTP directory listings,
762
763# mod_status and mod_info output etc., but not CGI generated documents).
764
765# Set to "EMail" to also include a mailto: link to the ServerAdmin.
766
767# Set to one of: On | Off | EMail
768
769#
770
771ServerSignature on
772
773
774
775#
776
777# Aliases: Add here as many aliases as you need (with no limit). The format is
778
779# Alias fakename realname
780
781#
782
783# Note that if you include a trailing / on fakename then the server will
784
785# require it to be present in the URL. So "/icons" isn't aliased in this
786
787# example, only "/icons/". If the fakename is slash-terminated, then the
788
789# realname must also be slash terminated, and if the fakename omits the
790
791# trailing slash, the realname must also omit it.
792
793#
794
795# We include the /icons/ alias for FancyIndexed directory listings. If you
796
797# do not use FancyIndexing, you may comment this out.
798
799#
800
801Alias /icons/ "/var/www/icons/"
802
803
804
805#
806
807# This should be changed to the ServerRoot/manual/. The alias provides
808
809# the manual, even if you choose to move your DocumentRoot. You may comment
810
811# this out if you do not care for the documentation.
812
813#
814
815Alias /manual "/var/www/manual"
816
817
818
819<ifmodule mod_dav_fs.c="">
820
821# Location of the WebDAV lock database.
822
823DAVLockDB /var/lib/dav/lockdb
824
825</ifmodule>
826
827
828
829#
830
831# ScriptAlias: This controls which directories contain server scripts.
832
833# ScriptAliases are essentially the same as Aliases, except that
834
835# documents in the realname directory are treated as applications and
836
837# run by the server when requested rather than as documents sent to the client.
838
839# The same rules about trailing "/" apply to ScriptAlias directives as to
840
841# Alias.
842
843#
844
845ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
846
847
848
849<ifmodule mod_cgid.c="">
850
851#
852
853# Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>
854
855# for setting UNIX socket for communicating with cgid.
856
857#
858
859#Scriptsock logs/cgisock
860
861</path></ifmodule>
862
863
864
865
866
867#
868
869# Redirect allows you to tell clients about documents which used to exist in
870
871# your server's namespace, but do not anymore. This allows you to tell the
872
873# clients where to look for the relocated document.
874
875# Example:
876
877# Redirect permanent /foo http://www.andsky.com/bar
878
879
880
881#
882
883# Directives controlling the display of server-generated directory listings.
884
885#
886
887
888
889#
890
891# FancyIndexing is whether you want fancy directory indexing or standard.
892
893# VersionSort is whether files containing version numbers should be
894
895# compared in the natural way, so that `apache-1.3.9.tar' is placed before
896
897# `apache-1.3.12.tar'.
898
899#
900
901IndexOptions FancyIndexing VersionSort NameWidth=*
902
903
904
905#
906
907# AddIcon* directives tell the server which icon to show for different
908
909# files or filename extensions. These are only displayed for
910
911# FancyIndexed directories.
912
913#
914
915AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
916
917
918
919AddIconByType (TXT,/icons/text.gif) text/*
920
921AddIconByType (IMG,/icons/image2.gif) image/*
922
923AddIconByType (SND,/icons/sound2.gif) audio/*
924
925AddIconByType (VID,/icons/movie.gif) video/*
926
927
928
929AddIcon /icons/binary.gif .bin .exe
930
931AddIcon /icons/binhex.gif .hqx
932
933AddIcon /icons/tar.gif .tar
934
935AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
936
937AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
938
939AddIcon /icons/a.gif .ps .ai .eps
940
941AddIcon /icons/layout.gif .html .shtml .htm .pdf
942
943AddIcon /icons/text.gif .txt
944
945AddIcon /icons/c.gif .c
946
947AddIcon /icons/p.gif .pl .py
948
949AddIcon /icons/f.gif .for
950
951AddIcon /icons/dvi.gif .dvi
952
953AddIcon /icons/uuencoded.gif .uu
954
955AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
956
957AddIcon /icons/tex.gif .tex
958
959AddIcon /icons/bomb.gif core
960
961
962
963AddIcon /icons/back.gif ..
964
965AddIcon /icons/hand.right.gif README
966
967AddIcon /icons/folder.gif ^^DIRECTORY^^
968
969AddIcon /icons/blank.gif ^^BLANKICON^^
970
971
972
973#
974
975# DefaultIcon is which icon to show for files which do not have an icon
976
977# explicitly set.
978
979#
980
981DefaultIcon /icons/unknown.gif
982
983
984
985#
986
987# AddDescription allows you to place a short description after a file in
988
989# server-generated indexes. These are only displayed for FancyIndexed
990
991# directories.
992
993# Format: AddDescription "description" filename
994
995#
996
997#AddDescription "GZIP compressed document" .gz
998
999#AddDescription "tar archive" .tar
1000
1001#AddDescription "GZIP compressed tar archive" .tgz
1002
1003
1004
1005#
1006
1007# ReadmeName is the name of the README file the server will look for by
1008
1009# default, and append to directory listings.
1010
1011#
1012
1013# HeaderName is the name of a file which should be prepended to
1014
1015# directory indexes.
1016
1017ReadmeName README.html
1018
1019HeaderName HEADER.html
1020
1021
1022
1023#
1024
1025# IndexIgnore is a set of filenames which directory indexing should ignore
1026
1027# and not include in the listing. Shell-style wildcarding is permitted.
1028
1029#
1030
1031IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
1032
1033
1034
1035#
1036
1037# AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
1038
1039# information on the fly. Note: Not all browsers support this.
1040
1041# Despite the name similarity, the following Add* directives have nothing
1042
1043# to do with the FancyIndexing customization directives above.
1044
1045#
1046
1047AddEncoding x-compress Z
1048
1049AddEncoding x-gzip gz tgz
1050
1051
1052
1053#
1054
1055# DefaultLanguage and AddLanguage allows you to specify the language of
1056
1057# a document. You can then use content negotiation to give a browser a
1058
1059# file in a language the user can understand.
1060
1061#
1062
1063# Specify a default language. This means that all data
1064
1065# going out without a specific language tag (see below) will
1066
1067# be marked with this one. You probably do NOT want to set
1068
1069# this unless you are sure it is correct for all cases.
1070
1071#
1072
1073# * It is generally better to not mark a page as
1074
1075# * being a certain language than marking it with the wrong
1076
1077# * language!
1078
1079#
1080
1081# DefaultLanguage nl
1082
1083#
1084
1085# Note 1: The suffix does not have to be the same as the language
1086
1087# keyword --- those with documents in Polish (whose net-standard
1088
1089# language code is pl) may wish to use "AddLanguage pl .po" to
1090
1091# avoid the ambiguity with the common suffix for perl scripts.
1092
1093#
1094
1095# Note 2: The example entries below illustrate that in some cases
1096
1097# the two character 'Language' abbreviation is not identical to
1098
1099# the two character 'Country' code for its country,
1100
1101# E.g. 'Danmark/dk' versus 'Danish/da'.
1102
1103#
1104
1105# Note 3: In the case of 'ltz' we violate the RFC by using a three char
1106
1107# specifier. There is 'work in progress' to fix this and get
1108
1109# the reference data for rfc1766 cleaned up.
1110
1111#
1112
1113# Danish (da) - Dutch (nl) - English (en) - Estonian (et)
1114
1115# French (fr) - German (de) - Greek-Modern (el)
1116
1117# Italian (it) - Norwegian (no) - Norwegian Nynorsk (nn) - Korean (kr)
1118
1119# Portugese (pt) - Luxembourgeois* (ltz)
1120
1121# Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cz)
1122
1123# Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)
1124
1125# Russian (ru) - Croatian (hr)
1126
1127#
1128
1129AddLanguage da .dk
1130
1131AddLanguage nl .nl
1132
1133AddLanguage en .en
1134
1135AddLanguage et .et
1136
1137AddLanguage fr .fr
1138
1139AddLanguage de .de
1140
1141AddLanguage he .he
1142
1143AddLanguage el .el
1144
1145AddLanguage it .it
1146
1147AddLanguage ja .ja
1148
1149AddLanguage pl .po
1150
1151AddLanguage kr .kr
1152
1153AddLanguage pt .pt
1154
1155AddLanguage nn .nn
1156
1157AddLanguage no .no
1158
1159AddLanguage pt-br .pt-br
1160
1161AddLanguage ltz .ltz
1162
1163AddLanguage ca .ca
1164
1165AddLanguage es .es
1166
1167AddLanguage sv .se
1168
1169AddLanguage cz .cz
1170
1171AddLanguage ru .ru
1172
1173AddLanguage tw .tw
1174
1175AddLanguage zh-tw .tw
1176
1177AddLanguage hr .hr
1178
1179
1180
1181#
1182
1183# LanguagePriority allows you to give precedence to some languages
1184
1185# in case of a tie during content negotiation.
1186
1187#
1188
1189# Just list the languages in decreasing order of preference. We have
1190
1191# more or less alphabetized them here. You probably want to change this.
1192
1193#
1194
1195LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ltz ca es sv tw
1196
1197
1198
1199#
1200
1201# ForceLanguagePriority allows you to serve a result page rather than
1202
1203# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
1204
1205# [in case no accepted languages matched the available variants]
1206
1207#
1208
1209ForceLanguagePriority Prefer Fallback
1210
1211
1212
1213#
1214
1215# Specify a default charset for all pages sent out. This is
1216
1217# always a good idea and opens the door for future internationalisation
1218
1219# of your web site, should you ever want it. Specifying it as
1220
1221# a default does little harm; as the standard dictates that a page
1222
1223# is in iso-8859-1 (latin1) unless specified otherwise i.e. you
1224
1225# are merely stating the obvious. There are also some security
1226
1227# reasons in browsers, related to javascript and URL parsing
1228
1229# which encourage you to always set a default char set.
1230
1231#
1232
1233AddDefaultCharset ISO-8859-1
1234
1235
1236
1237#
1238
1239# Commonly used filename extensions to character sets. You probably
1240
1241# want to avoid clashes with the language extensions, unless you
1242
1243# are good at carefully testing your setup after each change.
1244
1245# See ftp://ftp.isi.edu/in-notes/iana/ass.../character-sets for
1246
1247# the official list of charset names and their respective RFCs
1248
1249#
1250
1251AddCharset ISO-8859-1 .iso8859-1 .latin1
1252
1253AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
1254
1255AddCharset ISO-8859-3 .iso8859-3 .latin3
1256
1257AddCharset ISO-8859-4 .iso8859-4 .latin4
1258
1259AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru
1260
1261AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb
1262
1263AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk
1264
1265AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb
1266
1267AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk
1268
1269AddCharset ISO-2022-JP .iso2022-jp .jis
1270
1271AddCharset ISO-2022-KR .iso2022-kr .kis
1272
1273AddCharset ISO-2022-CN .iso2022-cn .cis
1274
1275AddCharset Big5 .Big5 .big5
1276
1277# For russian, more than one charset is used (depends on client, mostly):
1278
1279AddCharset WINDOWS-1251 .cp-1251 .win-1251
1280
1281AddCharset CP866 .cp866
1282
1283AddCharset KOI8-r .koi8-r .koi8-ru
1284
1285AddCharset KOI8-ru .koi8-uk .ua
1286
1287AddCharset ISO-10646-UCS-2 .ucs2
1288
1289AddCharset ISO-10646-UCS-4 .ucs4
1290
1291AddCharset UTF-8 .utf8
1292
1293
1294
1295# The set below does not map to a specific (iso) standard
1296
1297# but works on a fairly wide range of browsers. Note that
1298
1299# capitalization actually matters (it should not, but it
1300
1301# does for some browsers).
1302
1303#
1304
1305# See ftp://ftp.isi.edu/in-notes/iana/ass.../character-sets
1306
1307# for a list of sorts. But browsers support few.
1308
1309#
1310
1311AddCharset GB2312 .gb2312 .gb
1312
1313AddCharset utf-7 .utf7
1314
1315AddCharset utf-8 .utf8
1316
1317AddCharset big5 .big5 .b5
1318
1319AddCharset EUC-TW .euc-tw
1320
1321AddCharset EUC-JP .euc-jp
1322
1323AddCharset EUC-KR .euc-kr
1324
1325AddCharset shift_jis .sjis
1326
1327
1328
1329#
1330
1331# AddType allows you to add to or override the MIME configuration
1332
1333# file mime.types for specific file types.
1334
1335#
1336
1337AddType application/x-tar .tgz
1338
1339
1340
1341#
1342
1343# AddHandler allows you to map certain file extensions to "handlers":
1344
1345# actions unrelated to filetype. These can be either built into the server
1346
1347# or added with the Action directive (see below)
1348
1349#
1350
1351# To use CGI scripts outside of ScriptAliased directories:
1352
1353# (You will also need to add "ExecCGI" to the "Options" directive.)
1354
1355#
1356
1357#AddHandler cgi-script .cgi
1358
1359
1360
1361#
1362
1363# For files that include their own HTTP headers:
1364
1365#
1366
1367#AddHandler send-as-is asis
1368
1369
1370
1371#
1372
1373# For server-parsed imagemap files:
1374
1375#
1376
1377AddHandler imap-file map
1378
1379
1380
1381#
1382
1383# For type maps (negotiated resources):
1384
1385# (This is enabled by default to allow the Apache "It Worked" page
1386
1387# to be distributed in multiple languages.)
1388
1389#
1390
1391AddHandler type-map var
1392
1393
1394
1395# Filters allow you to process content before it is sent to the client.
1396
1397#
1398
1399# To parse .shtml files for server-side includes (SSI):
1400
1401# (You will also need to add "Includes" to the "Options" directive.)
1402
1403#
1404
1405AddOutputFilter INCLUDES .shtml
1406
1407
1408
1409#
1410
1411# Action lets you define</virtualhost></virtualhost></virtualhost></virtualhost></virtualhost></virtualhost></virtualhost></virtualhost></url:>