Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1339 connectés 

  FORUM HardWare.fr
  Linux et OS Alternatifs
  Codes et scripts

  changement du répertoire racine d'apache macOS X

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

changement du répertoire racine d'apache macOS X

n°782508
mateus2
Posté le 14-02-2006 à 23:13:57  profilanswer
 

bonjour,
 
je viens d'installer php qui est présent directement dans la version mac OS 10.2. Php fonctionne très bien. En effet, après avoir activé php, j'ai placé un fichier php dans le dossier "Sites" et en tapant http://127.0.0.1/~monpseudo/index.php dans IE je vois l'exécution de mon fichier.
 
Maintenant, je voudrais déplacer mes fichiers php du dossier "Sites" et les mettre sur ma partition "data" (la deuxième partition de mon disque dur)complètement vierge.
 
Dans le fichier httpd.conf, j'ai donc changé les lignes suivantes:
 
DocumentRoot "/data/Siteweb/"
<Directory "/data/siteweb/"
 
"Siteweb" est un dossier que j'ai crée dans ma partoche "data". C'est donc dans ce dossier que j'ai placé mes fichiers php.
Mais quand j'essaie de redémarrer apache, je me fais jeter et il me dit : "DocumentRoot" must be a directory.
 
alors comment puis-je faire pour rediriger vers le dossier "Siteweb" de ma partition "data" ?
 
merci d'avance

mood
Publicité
Posté le 14-02-2006 à 23:13:57  profilanswer
 

n°782560
Combi_A_Ve​ndre
Posté le 15-02-2006 à 08:48:04  profilanswer
 

Tu peux nous dire ce que renvoi la commande "httpd -S" ?
Et éventuellement ton fichier httpd.conf complet.
 
vw

n°782640
mateus2
Posté le 15-02-2006 à 12:36:55  profilanswer
 

bonjour à toi Combi_A_Vendre,
 
alors voici ce que renvoit la commande "httpd -S":
 

Code :
  1. Processing config directory: /private/etc/httpd/users
  2. Processing config file: /private/etc/httpd/users/matt.conf
  3. [Wed Feb 15 12:27:55 2006] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
  4. VirtualHost configuration:


 
et voici mon fichier httpd.conf:
 

Code :
  1. ##
  2. ## httpd.conf -- Apache HTTP server configuration file
  3. ##
  4. #
  5. # Based upon the NCSA server configuration files originally by Rob McCool.
  6. #
  7. # This is the main Apache server configuration file.  It contains the
  8. # configuration directives that give the server its instructions.
  9. # See <URL:http://www.apache.org/docs/> for detailed information about
  10. # the directives.
  11. #
  12. # Do NOT simply read the instructions in here without understanding
  13. # what they do.  They're here only as hints or reminders.  If you are unsure
  14. # consult the online docs. You have been warned.
  15. #
  16. # After this file is processed, the server will look for and process
  17. # /usr/conf/srm.conf and then /usr/conf/access.conf
  18. # unless you have overridden these with ResourceConfig and/or
  19. # AccessConfig directives here.
  20. #
  21. # The configuration directives are grouped into three basic sections:
  22. #  1. Directives that control the operation of the Apache server process as a
  23. #     whole (the 'global environment').
  24. #  2. Directives that define the parameters of the 'main' or 'default' server,
  25. #     which responds to requests that aren't handled by a virtual host.
  26. #     These directives also provide default values for the settings
  27. #     of all virtual hosts.
  28. #  3. Settings for virtual hosts, which allow Web requests to be sent to
  29. #     different IP addresses or hostnames and have them handled by the
  30. #     same Apache server process.
  31. #
  32. # Configuration and logfile names: If the filenames you specify for many
  33. # of the server's control files begin with "/" (or "drive:/" for Win32), the
  34. # server will use that explicit path.  If the filenames do *not* begin
  35. # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
  36. # with ServerRoot set to "/usr/local/apache" will be interpreted by the
  37. # server as "/usr/local/apache/logs/foo.log".
  38. #   
  39. ### Section 1: Global Environment
  40. #   
  41. # The directives in this section affect the overall operation of Apache,
  42. # such as the number of concurrent requests it can handle or where it 
  43. # can find its configuration files.
  44. #   
  45.  
  46. #
  47. # ServerType is either inetd, or standalone.  Inetd mode is only supported on
  48. # Unix platforms.
  49. #
  50. ServerType standalone
  51. #   
  52. # ServerRoot: The top of the directory tree under which the server's
  53. # configuration, error, and log files are kept.
  54. #   
  55. # NOTE!  If you intend to place this on an NFS (or otherwise network) 
  56. # mounted filesystem then please read the LockFile documentation
  57. # (available at <URL:http://www.apache.org/docs/mod/core.html#lockfile> );
  58. # you will save yourself a lot of trouble.
  59. #
  60. ServerRoot "/usr"
  61. #
  62. # The LockFile directive sets the path to the lockfile used when Apache
  63. # is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or
  64. # USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be left at
  65. # its default value. The main reason for changing it is if the logs
  66. # directory is NFS mounted, since the lockfile MUST BE STORED ON A LOCAL
  67. # DISK. The PID of the main server process is automatically appended to
  68. # the filename.
  69. #
  70. #LockFile "/private/var/run/httpd.lock"
  71. #
  72. # PidFile: The file in which the server should record its process
  73. # identification number when it starts.
  74. #
  75. PidFile "/private/var/run/httpd.pid"
  76. #
  77. # ScoreBoardFile: File used to store internal server process information.
  78. # Not all architectures require this.  But if yours does (you'll know because
  79. # this file will be  created when you run Apache) then you *must* ensure that
  80. # no two invocations of Apache share the same scoreboard file.
  81. #
  82. ScoreBoardFile "/private/var/run/httpd.scoreboard"
  83. #
  84. # In the standard configuration, the server will process httpd.conf (this
  85. # file, specified by the -f command line option), srm.conf, and access.conf
  86. # in that order.  The latter two files are now distributed empty, as it is
  87. # recommended that all directives be kept in a single file for simplicity.
  88. # The commented-out values below are the built-in defaults.  You can have the
  89. # server ignore these files altogether by using "/dev/null" (for Unix) or
  90. # "nul" (for Win32) for the arguments to the directives.
  91. #
  92. #ResourceConfig conf/srm.conf
  93. #AccessConfig conf/access.conf
  94. #
  95. # Timeout: The number of seconds before receives and sends time out.
  96. #
  97. Timeout 300
  98. #
  99. # KeepAlive: Whether or not to allow persistent connections (more than
  100. # one request per connection). Set to "Off" to deactivate.
  101. #
  102. KeepAlive On
  103. #
  104. # MaxKeepAliveRequests: The maximum number of requests to allow
  105. # during a persistent connection. Set to 0 to allow an unlimited amount.
  106. # We recommend you leave this number high, for maximum performance.
  107. #
  108. MaxKeepAliveRequests 100
  109. #
  110. # KeepAliveTimeout: Number of seconds to wait for the next request from the
  111. # same client on the same connection.
  112. #
  113. KeepAliveTimeout 15
  114. #
  115. # Server-pool size regulation.  Rather than making you guess how many
  116. # server processes you need, Apache dynamically adapts to the load it
  117. # sees --- that is, it tries to maintain enough server processes to
  118. # handle the current load, plus a few spare servers to handle transient
  119. # load spikes (e.g., multiple simultaneous requests from a single 
  120. # Netscape browser).
  121. #
  122. # It does this by periodically checking how many servers are waiting
  123. # for a request.  If there are fewer than MinSpareServers, it creates
  124. # a new spare.  If there are more than MaxSpareServers, some of the
  125. # spares die off.  The default values are probably OK for most sites.
  126. #
  127. MinSpareServers 1 
  128. MaxSpareServers 5
  129.  
  130. #
  131. # Number of servers to start initially --- should be a reasonable ballpark
  132. # figure.
  133. #
  134. StartServers 1
  135. #
  136. # Limit on total number of servers running, i.e., limit on the number
  137. # of clients who can simultaneously connect --- if this limit is ever
  138. # reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
  139. # It is intended mainly as a brake to keep a runaway server from taking
  140. # the system with it as it spirals down...
  141. #
  142. MaxClients 150 
  143. #
  144. # MaxRequestsPerChild: the number of requests each child process is
  145. # allowed to process before the child dies.  The child will exit so
  146. # as to avoid problems after prolonged use when Apache (and maybe the
  147. # libraries it uses) leak memory or other resources.  On most systems, this
  148. # isn't really needed, but a few (such as Solaris) do have notable leaks
  149. # in the libraries. For these platforms, set to something like 10000
  150. # or so; a setting of 0 means unlimited.
  151. #
  152. # NOTE: This value does not include keepalive requests after the initial
  153. #       request per connection. For example, if a child process handles
  154. #       an initial request and 10 subsequent "keptalive" requests, it
  155. #       would only count as 1 request towards this limit.
  156. #
  157. MaxRequestsPerChild 100000
  158.  
  159. #
  160. # Listen: Allows you to bind Apache to specific IP addresses and/or
  161. # ports, in addition to the default. See also the <VirtualHost>
  162. # directive.
  163. #
  164. #Listen 3000
  165. #Listen 12.34.56.78:80
  166.  
  167. #
  168. # BindAddress: You can support virtual hosts with this option. This directive
  169. # is used to tell the server which IP address to listen to. It can either
  170. # contain "*", an IP address, or a fully qualified Internet domain name.
  171. # See also the <VirtualHost> and Listen directives.
  172. #
  173. #BindAddress *
  174.  
  175. #
  176. # Dynamic Shared Object (DSO) Support
  177. #
  178. # To be able to use the functionality of a module which was built as a DSO you
  179. # have to place corresponding `LoadModule' lines at this location so the
  180. # directives contained in it are actually available _before_ they are used.
  181. # Please read the file http://httpd.apache.org/docs/dso.html for more
  182. # details about the DSO mechanism and run `httpd -l' for the list of already
  183. # built-in (statically linked and thus always available) modules in your httpd
  184. # binary.
  185. #
  186. # Note: The order in which modules are loaded is important.  Don't change
  187. # the order below without expert advice.
  188. #
  189. # Example:
  190. # LoadModule foo_module libexec/mod_foo.so
  191. #LoadModule vhost_alias_module libexec/httpd/mod_vhost_alias.so
  192. #LoadModule env_module         libexec/httpd/mod_env.so
  193. LoadModule config_log_module  libexec/httpd/mod_log_config.so
  194. #LoadModule mime_magic_module  libexec/httpd/mod_mime_magic.so
  195. LoadModule mime_module        libexec/httpd/mod_mime.so
  196. LoadModule negotiation_module libexec/httpd/mod_negotiation.so
  197. #LoadModule status_module      libexec/httpd/mod_status.so
  198. #LoadModule info_module        libexec/httpd/mod_info.so
  199. LoadModule includes_module    libexec/httpd/mod_include.so
  200. LoadModule autoindex_module   libexec/httpd/mod_autoindex.so
  201. LoadModule dir_module         libexec/httpd/mod_dir.so
  202. LoadModule cgi_module         libexec/httpd/mod_cgi.so
  203. LoadModule asis_module        libexec/httpd/mod_asis.so
  204. LoadModule imap_module        libexec/httpd/mod_imap.so
  205. LoadModule action_module      libexec/httpd/mod_actions.so
  206. #LoadModule speling_module     libexec/httpd/mod_speling.so
  207. LoadModule userdir_module     libexec/httpd/mod_userdir.so
  208. LoadModule alias_module       libexec/httpd/mod_alias.so
  209. LoadModule rewrite_module     libexec/httpd/mod_rewrite.so
  210. LoadModule access_module      libexec/httpd/mod_access.so
  211. LoadModule auth_module        libexec/httpd/mod_auth.so
  212. #LoadModule anon_auth_module   libexec/httpd/mod_auth_anon.so
  213. #LoadModule dbm_auth_module    libexec/httpd/mod_auth_dbm.so
  214. #LoadModule digest_module      libexec/httpd/mod_digest.so
  215. #LoadModule proxy_module       libexec/httpd/libproxy.so
  216. #LoadModule cern_meta_module   libexec/httpd/mod_cern_meta.so
  217. #LoadModule expires_module     libexec/httpd/mod_expires.so
  218. #LoadModule headers_module     libexec/httpd/mod_headers.so
  219. #LoadModule usertrack_module   libexec/httpd/mod_usertrack.so
  220. #LoadModule unique_id_module   libexec/httpd/mod_unique_id.so
  221. LoadModule setenvif_module    libexec/httpd/mod_setenvif.so
  222. #LoadModule dav_module         libexec/httpd/libdav.so
  223. #LoadModule ssl_module         libexec/httpd/libssl.so   
  224. #LoadModule perl_module        libexec/httpd/libperl.so 
  225. LoadModule php4_module        libexec/httpd/libphp4.so     
  226. LoadModule hfs_apple_module   libexec/httpd/mod_hfs_apple.so
  227. #  Reconstruction of the complete module list from all available modules
  228. #  (static and shared ones) to achieve correct module execution order.
  229. #  [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
  230. ClearModuleList
  231. #AddModule mod_vhost_alias.c
  232. #AddModule mod_env.c
  233. AddModule mod_log_config.c
  234. #AddModule mod_mime_magic.c
  235. AddModule mod_mime.c
  236. AddModule mod_negotiation.c
  237. #AddModule mod_status.c
  238. #AddModule mod_info.c
  239. AddModule mod_include.c
  240. AddModule mod_autoindex.c
  241. AddModule mod_dir.c
  242. AddModule mod_cgi.c
  243. AddModule mod_asis.c
  244. AddModule mod_imap.c
  245. AddModule mod_actions.c
  246. #AddModule mod_speling.c
  247. AddModule mod_userdir.c
  248. AddModule mod_alias.c
  249. AddModule mod_rewrite.c
  250. AddModule mod_access.c
  251. AddModule mod_auth.c
  252. #AddModule mod_auth_anon.c
  253. #AddModule mod_auth_dbm.c
  254. #AddModule mod_digest.c
  255. #AddModule mod_proxy.c 
  256. #AddModule mod_cern_meta.c
  257. #AddModule mod_expires.c
  258. #AddModule mod_headers.c
  259. #AddModule mod_usertrack.c
  260. #AddModule mod_unique_id.c
  261. AddModule mod_so.c
  262. AddModule mod_setenvif.c
  263. #AddModule mod_dav.c
  264. #AddModule mod_ssl.c 
  265. #AddModule mod_perl.c
  266. AddModule mod_php4.c
  267. AddModule mod_hfs_apple.c
  268. #
  269. # ExtendedStatus controls whether Apache will generate "full" status
  270. # information (ExtendedStatus On) or just basic information (ExtendedStatus
  271. # Off) when the "server-status" handler is called. The default is Off.
  272. #
  273. #ExtendedStatus On
  274. ### Section 2: 'Main' server configuration
  275. #
  276. # The directives in this section set up the values used by the 'main'
  277. # server, which responds to any requests that aren't handled by a
  278. # <VirtualHost> definition.  These values also provide defaults for
  279. # any <VirtualHost> containers you may define later in the file.
  280. #
  281. # All of these directives may appear inside <VirtualHost> containers,
  282. # in which case these default settings will be overridden for the
  283. # virtual host being defined.
  284. #
  285. #
  286. # If your ServerType directive (set earlier in the 'Global Environment'
  287. # section) is set to "inetd", the next few directives don't have any
  288. # effect since their settings are defined by the inetd configuration.
  289. # Skip ahead to the ServerAdmin directive.
  290. #
  291. #
  292. # Port: The port to which the standalone server listens. For
  293. # ports < 1023, you will need httpd to be run as root initially.
  294. #
  295. Port 80
  296. #
  297. # If you wish httpd to run as a different user or group, you must run
  298. # httpd as root initially and it will switch.
  299. #
  300. # User/Group: The name (or #number) of the user/group to run httpd as.
  301. #  . On SCO (ODT 3) use "User nouser" and "Group nogroup".
  302. #  . On HPUX you may not be able to use shared memory as nobody, and the
  303. #    suggested workaround is to create a user www and use that user.
  304. #  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
  305. #  when the value of (unsigned)Group is above 60000;
  306. #  don't use Group nobody on these systems!
  307. #
  308. User www
  309. Group www
  310. #
  311. # ServerAdmin: Your address, where problems with the server should be
  312. # e-mailed.  This address appears on some server-generated pages, such
  313. # as error documents.
  314. #
  315. #ServerAdmin webmaster@example.com
  316. #   
  317. # ServerName allows you to set a host name which is sent back to clients for
  318. # your server if it's different than the one the program would get (i.e., use
  319. # "www" instead of the host's real name). 
  320. #
  321. # Note: You cannot just invent host names and hope they work. The name you
  322. # define here must be a valid DNS name for your host. If you don't understand
  323. # this, ask your network administrator.
  324. # If your host doesn't have a registered DNS name, enter its IP address here.
  325. # You will have to access it by its address (e.g., http://123.45.67.89/)
  326. # anyway, and this will make redirections work in a sensible way.
  327. #
  328. # 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your
  329. # machine always knows itself by this address. If you use Apache strictly for
  330. # local testing and development, you may use 127.0.0.1 as the server name.
  331. #   
  332. #ServerName edo
  333. #
  334. # DocumentRoot: The directory out of which you will serve your
  335. # documents. By default, all requests are taken from this directory, but 
  336. # symbolic links and aliases may be used to point to other locations.
  337. #
  338. DocumentRoot "/data/Sites/Siteweb/"
  339. #
  340. # Each directory to which Apache has access, can be configured with respect
  341. # to which services and features are allowed and/or disabled in that
  342. # directory (and its subdirectories).
  343. #
  344. # First, we configure the "default" to be a very restrictive set of
  345. # permissions.
  346. #
  347. <Directory />
  348.     Options FollowSymLinks
  349.     AllowOverride None
  350. </Directory>
  351. #
  352. # Note that from this point forward you must specifically allow
  353. # particular features to be enabled - so if something's not working as
  354. # you might expect, make sure that you have specifically enabled it
  355. # below.
  356. #
  357.  
  358. #
  359. # This should be changed to whatever you set DocumentRoot to.
  360. <Directory "/data/Sites/Siteweb/">
  361.    
  362. #
  363. # This may also be "None", "All", or any combination of "Indexes",
  364. # "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
  365. #
  366. # Note that "MultiViews" must be named *explicitly* --- "Options All"
  367. # doesn't give it to you.
  368. #
  369.     Options Indexes FollowSymLinks MultiViews
  370.  
  371. #
  372. # This controls which options the .htaccess files in directories can
  373. # override. Can also be "All", or any combination of "Options", "FileInfo",
  374. # "AuthConfig", and "Limit"
  375. #
  376.     AllowOverride None
  377. #
  378. # Controls who can get stuff from this server.
  379. #
  380.     Order allow,deny
  381.     Allow from all
  382. </Directory>
  383.    
  384. # UserDir: The name of the directory which is appended onto a user's home
  385. # directory if a ~user request is received.
  386. #
  387. <IfModule mod_userdir.c> 
  388.     UserDir Sites
  389. DirectoryIndex index.php3 index.php index.html
  390. </IfModule>
  391.  
  392. #
  393. # Control access to UserDir directories.  The following is an example
  394. # for a site where these directories are restricted to read-only.
  395. #
  396. #<Directory /home/*/Sites>
  397. #    AllowOverride FileInfo AuthConfig Limit
  398. #    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
  399. #    <Limit GET POST OPTIONS PROPFIND>
  400. #        Order allow,deny
  401. #        Allow from all
  402. #    </Limit>
  403. #    <LimitExcept GET POST OPTIONS PROPFIND>
  404. #        Order deny,allow
  405. #        Deny from all
  406. #    </LimitExcept>
  407. #</Directory>
  408. #
  409. # DirectoryIndex: Name of the file or files to use as a pre-written HTML
  410. # directory index.  Separate multiple entries with spaces.
  411. #   
  412. <IfModule mod_dir.c>
  413.     DirectoryIndex index.html
  414. </IfModule>
  415. #   
  416. # AccessFileName: The name of the file to look for in each directory
  417. # for access control information.
  418. #       
  419. AccessFileName .htaccess
  420. #
  421. # The following lines prevent .htaccess files from being viewed by
  422. # Web clients.  Since .htaccess files often contain authorization
  423. # information, access is disallowed for security reasons.  Comment
  424. # these lines out if you want Web visitors to see the contents of
  425. # .htaccess files.  If you change the AccessFileName directive above,
  426. # be sure to make the corresponding changes here.
  427. #
  428. # Also, folks tend to use names such as .htpasswd for password
  429. # files, so this will protect those as well.
  430. #
  431. <Files ~ "^\.ht">
  432.     Order allow,deny
  433.     Deny from all
  434.     Satisfy All
  435. </Files>
  436. #
  437. # CacheNegotiatedDocs: By default, Apache sends "Pragma: no-cache" with each
  438. # document that was negotiated on the basis of content. This asks proxy
  439. # servers not to cache the document. Uncommenting the following line disables
  440. # this behavior, and proxies will be allowed to cache the documents.
  441. #
  442. #CacheNegotiatedDocs
  443. #
  444. # UseCanonicalName:  (new for 1.3)  With this setting turned on, whenever
  445. # Apache needs to construct a self-referencing URL (a URL that refers back
  446. # to the server the response is coming from) it will use ServerName and
  447. # Port to form a "canonical" name.  With this setting off, Apache will
  448. # use the hostname:port that the client supplied, when possible.  This
  449. # also affects SERVER_NAME and SERVER_PORT in CGI scripts.
  450. #
  451. UseCanonicalName On
  452. #
  453. # TypesConfig describes where the mime.types file (or equivalent) is
  454. # to be found.
  455. #
  456. <IfModule mod_mime.c>
  457.     TypesConfig /private/etc/httpd/mime.types
  458. </IfModule>
  459. #
  460. # DefaultType is the default MIME type the server will use for a document
  461. # if it cannot otherwise determine one, such as from filename extensions.
  462. # If your server contains mostly text or HTML documents, "text/plain" is
  463. # a good value.  If most of your content is binary, such as applications
  464. # or images, you may want to use "application/octet-stream" instead to
  465. # keep browsers from trying to display binary files as though they are
  466. # text.
  467. #
  468. DefaultType text/plain
  469. #
  470. # The mod_mime_magic module allows the server to use various hints from the
  471. # contents of the file itself to determine its type.  The MIMEMagicFile
  472. # directive tells the module where the hint definitions are located.
  473. # mod_mime_magic is not part of the default server (you have to add
  474. # it yourself with a LoadModule [see the DSO paragraph in the 'Global
  475. # Environment' section], or recompile the server and include mod_mime_magic
  476. # as part of the configuration), so it's enclosed in an <IfModule> container.
  477. # This means that the MIMEMagicFile directive will only be processed if the
  478. # module is part of the server.
  479. #
  480. <IfModule mod_mime_magic.c>
  481.     MIMEMagicFile /private/etc/httpd/magic
  482. </IfModule>
  483. #
  484. # HostnameLookups: Log the names of clients or just their IP addresses
  485. # e.g., www.apache.org (on) or 204.62.129.132 (off).
  486. # The default is off because it'd be overall better for the net if people
  487. # had to knowingly turn this feature on, since enabling it means that
  488. # each client request will result in AT LEAST one lookup request to the
  489. # nameserver.
  490. #
  491. HostnameLookups Off
  492. #
  493. # ErrorLog: The location of the error log file.
  494. # If you do not specify an ErrorLog directive within a <VirtualHost>
  495. # container, error messages relating to that virtual host will be
  496. # logged here.  If you *do* define an error logfile for a <VirtualHost>
  497. # container, that host's errors will be logged there and not here.
  498. #
  499. ErrorLog "/private/var/log/httpd/error_log"
  500. #
  501. # LogLevel: Control the number of messages logged to the error_log.
  502. # Possible values include: debug, info, notice, warn, error, crit,
  503. # alert, emerg.
  504. #
  505. LogLevel warn
  506.  
  507. #
  508. # The following directives define some format nicknames for use with
  509. # a CustomLog directive (see below).
  510. #
  511. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  512. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  513. LogFormat "%{Referer}i -> %U" referer
  514. LogFormat "%{User-agent}i" agent
  515.  
  516. #
  517. # The location and format of the access logfile (Common Logfile Format).
  518. # If you do not define any access logfiles within a <VirtualHost>
  519. # container, they will be logged here.  Contrariwise, if you *do*
  520. # define per-<VirtualHost> access logfiles, transactions will be
  521. # logged therein and *not* in this file.
  522. #
  523. CustomLog "/private/var/log/httpd/access_log" common
  524. #
  525. # If you would like to have agent and referer logfiles, uncomment the
  526. # following directives.
  527. #
  528. #CustomLog "/private/var/log/httpd/referer_log" referer
  529. #CustomLog "/private/var/log/httpd/agent_log" agent
  530.  
  531. #
  532. # If you prefer a single logfile with access, agent, and referer information
  533. # (Combined Logfile Format) you can use the following directive.
  534. #
  535. #CustomLog "/private/var/log/httpd/access_log" combined
  536.  
  537. #
  538. # Optionally add a line containing the server version and virtual host
  539. # name to server-generated pages (error documents, FTP directory listings,
  540. # mod_status and mod_info output etc., but not CGI generated documents).
  541. # Set to "EMail" to also include a mailto: link to the ServerAdmin.
  542. # Set to one of:  On | Off | EMail
  543. #
  544. ServerSignature On
  545.  
  546. # EBCDIC configuration:
  547. # (only for mainframes using the EBCDIC codeset, currently one of:
  548. # Fujitsu-Siemens' BS2000/OSD, IBM's OS/390 and IBM's TPF)!!
  549. # The following default configuration assumes that "text files"
  550. # are stored in EBCDIC (so that you can operate on them using the
  551. # normal POSIX tools like grep and sort) while "binary files" are
  552. # stored with identical octets as on an ASCII machine.
  553. #
  554. # The directives are evaluated in configuration file order, with
  555. # the EBCDICConvert directives applied before EBCDICConvertByType.
  556. #
  557. # If you want to have ASCII HTML documents and EBCDIC HTML documents
  558. # at the same time, you can use the file extension to force
  559. # conversion off for the ASCII documents:
  560. # > AddType       text/html .ahtml
  561. # > EBCDICConvert Off=InOut .ahtml
  562. #
  563. # EBCDICConvertByType  On=InOut text/* message/* multipart/*
  564. # EBCDICConvertByType  On=In    application/x-www-form-urlencoded
  565. # EBCDICConvertByType  On=InOut application/postscript model/vrml
  566. # EBCDICConvertByType Off=InOut */*
  567.    
  568. #  
  569. # Aliases: Add here as many aliases as you need (with no limit). The format is
  570. # Alias fakename realname
  571. #  
  572. <IfModule mod_alias.c>
  573.     #
  574.     # Note that if you include a trailing / on fakename then the server will
  575.     # require it to be present in the URL.  So "/icons" isn't aliased in this
  576.     # example, only "/icons/".  If the fakename is slash-terminated, then the
  577.     # realname must also be slash terminated, and if the fakename omits the
  578.     # trailing slash, the realname must also omit it.
  579.     #
  580.     Alias /icons/ "/usr/share/httpd/icons/"
  581.    
  582.     <Directory "/usr/share/httpd/icons">
  583.         Options Indexes MultiViews
  584.  AllowOverride None
  585.         Order allow,deny
  586.         Allow from all
  587.     </Directory>
  588.      
  589.     # This Alias will project the on-line documentation tree under /manual/  
  590.     # even if you change the DocumentRoot. Comment it if you don't want to   
  591.     # provide access to the on-line documentation.
  592.     #  
  593.     Alias /manual/ "/Library/WebServer/Documents/manual/"
  594.      
  595.     <Directory "/Library/WebServer/Documents/manual">
  596.         Options Indexes FollowSymlinks MultiViews
  597.         AllowOverride None
  598.         Order allow,deny
  599.         Allow from all
  600.     </Directory>
  601.          
  602.     #
  603.     # ScriptAlias: This controls which directories contain server scripts.
  604.     # ScriptAliases are essentially the same as Aliases, except that
  605.     # documents in the realname directory are treated as applications and     
  606.     # run by the server when requested rather than as documents sent to the client.
  607.     # The same rules about trailing "/" apply to ScriptAlias directives as to
  608.     # Alias.
  609.     #
  610.     ScriptAlias /cgi-bin/ "/Library/WebServer/CGI-Executables/"
  611.          
  612.     #
  613.     # "/Library/WebServer/CGI-Executables" should be changed to whatever your ScriptAliased
  614.     # CGI directory exists, if you have that configured.
  615.     #
  616.     <Directory "/Library/WebServer/CGI-Executables">
  617.         AllowOverride None
  618.         Options None
  619.         Order allow,deny
  620.         Allow from all
  621.     </Directory>
  622.      
  623. </IfModule>  
  624. # End of aliases.
  625.      
  626. #
  627. # Redirect allows you to tell clients about documents which used to exist in
  628. # your server's namespace, but do not anymore. This allows you to tell the
  629. # clients where to look for the relocated document.
  630. # Format: Redirect old-URI new-URL
  631. #
  632.          
  633. #
  634. # Directives controlling the display of server-generated directory listings.
  635. #
  636. <IfModule mod_autoindex.c>
  637.      
  638.     #
  639.     # FancyIndexing is whether you want fancy directory indexing or standard
  640.     #
  641.     IndexOptions FancyIndexing
  642. #
  643.     # AddIcon* directives tell the server which icon to show for different
  644.     # files or filename extensions.  These are only displayed for
  645.     # FancyIndexed directories.
  646.     #   
  647.     AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
  648.     AddIconByType (TXT,/icons/text.gif) text/*
  649.     AddIconByType (IMG,/icons/image2.gif) image/*
  650.     AddIconByType (SND,/icons/sound2.gif) audio/*
  651.     AddIconByType (VID,/icons/movie.gif) video/*
  652.      
  653.     AddIcon /icons/binary.gif .bin .exe
  654.     AddIcon /icons/binhex.gif .hqx
  655.     AddIcon /icons/tar.gif .tar
  656.     AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
  657.     AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
  658.     AddIcon /icons/a.gif .ps .ai .eps
  659.     AddIcon /icons/layout.gif .html .shtml .htm .pdf
  660.     AddIcon /icons/text.gif .txt
  661.     AddIcon /icons/c.gif .c
  662.     AddIcon /icons/p.gif .pl .py
  663.     AddIcon /icons/f.gif .for
  664.     AddIcon /icons/dvi.gif .dvi
  665.     AddIcon /icons/uuencoded.gif .uu
  666.     AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
  667.     AddIcon /icons/tex.gif .tex
  668.     AddIcon /icons/bomb.gif core
  669.      
  670.     AddIcon /icons/back.gif ..  
  671.     AddIcon /icons/hand.right.gif README
  672.     AddIcon /icons/folder.gif ^^DIRECTORY^^
  673.     AddIcon /icons/blank.gif ^^BLANKICON^^
  674.      
  675.     #
  676.     # DefaultIcon is which icon to show for files which do not have an icon
  677.     # explicitly set.
  678.     #
  679.     DefaultIcon /icons/unknown.gif
  680.      
  681.     #
  682.     # AddDescription allows you to place a short description after a file in
  683.     # server-generated indexes.  These are only displayed for FancyIndexed
  684.     # directories.
  685.     # Format: AddDescription "description" filename
  686.     #
  687.     #AddDescription "GZIP compressed document" .gz
  688.     #AddDescription "tar archive" .tar
  689.     #AddDescription "GZIP compressed tar archive" .tgz
  690.      
  691.     #  
  692.     # ReadmeName is the name of the README file the server will look for by
  693.     # default, and append to directory listings.
  694.     #
  695.     # HeaderName is the name of a file which should be prepended to
  696.     # directory indexes.
  697.     #  
  698.     # If MultiViews are amongst the Options in effect, the server will
  699.     # first look for name.html and include it if found.  If name.html
  700.     # doesn't exist, the server will then look for name.txt and include
  701.     # it as plaintext if found.
  702.     #
  703.     ReadmeName README
  704.     HeaderName HEADER
  705.      
  706.     #  
  707.     # IndexIgnore is a set of filenames which directory indexing should ignore
  708.     # and not include in the listing.  Shell-style wildcarding is permitted.
  709.     #
  710.     IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
  711.      
  712. </IfModule>
  713. # End of indexing directives.
  714.      
  715. #
  716. # Document types.
  717. #
  718. <IfModule mod_mime.c>
  719.      
  720.     #
  721.     # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
  722.     # information on the fly. Note: Not all browsers support this.
  723.     # Despite the name similarity, the following Add* directives have nothing
  724.     # to do with the FancyIndexing customization directives above.
  725.     #
  726.     AddEncoding x-compress Z
  727.     AddEncoding x-gzip gz tgz
  728.     #
  729.     # AddLanguage allows you to specify the language of a document. You can
  730.     # then use content negotiation to give a browser a file in a language
  731.     # it can understand.
  732.     #
  733.     # Note 1: The suffix does not have to be the same as the language
  734.     # keyword --- those with documents in Polish (whose net-standard
  735.     # language code is pl) may wish to use "AddLanguage pl .po" to
  736.     # avoid the ambiguity with the common suffix for perl scripts.
  737.     #  
  738.     # Note 2: The example entries below illustrate that in quite   
  739.     # some cases the two character 'Language' abbreviation is not
  740.     # identical to the two character 'Country' code for its country,
  741.     # E.g. 'Danmark/dk' versus 'Danish/da'.
  742.     #
  743.     # Note 3: In the case of 'ltz' we violate the RFC by using a three char
  744.     # specifier. But there is 'work in progress' to fix this and get
  745.     # the reference data for rfc1766 cleaned up.
  746.     #  
  747.     # Danish (da) - Dutch (nl) - English (en) - Estonian (ee)
  748.     # French (fr) - German (de) - Greek-Modern (el)
  749.     # Italian (it) - Korean (kr) - Norwegian (no) - Norwegian Nynorsk (nn)
  750.     # Portugese (pt) - Luxembourgeois* (ltz)
  751.     # Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cz)
  752.     # Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)
  753.     # Russian (ru)
  754.     #  
  755.     AddLanguage da .dk
  756.     AddLanguage nl .nl
  757.     AddLanguage en .en
  758.     AddLanguage et .ee
  759.     AddLanguage fr .fr
  760.     AddLanguage de .de
  761.     AddLanguage el .el
  762.     AddLanguage he .he
  763.     AddCharset ISO-8859-8 .iso8859-8
  764.     AddLanguage it .it
  765.     AddLanguage ja .ja
  766.     AddCharset ISO-2022-JP .jis
  767.     AddLanguage kr .kr
  768.     AddCharset ISO-2022-KR .iso-kr
  769.     AddLanguage nn .nn
  770.     AddLanguage no .no
  771.     AddLanguage pl .po
  772.     AddCharset ISO-8859-2 .iso-pl
  773.     AddLanguage pt .pt
  774.     AddLanguage pt-br .pt-br
  775.     AddLanguage ltz .lu
  776.     AddLanguage ca .ca
  777.     AddLanguage es .es
  778.     AddLanguage sv .sv
  779.     AddLanguage cz .cz
  780.     AddLanguage ru .ru
  781.     AddLanguage zh-tw .tw
  782.     AddLanguage tw .tw
  783.     AddCharset Big5         .Big5    .big5
  784.     AddCharset WINDOWS-1251 .cp-1251
  785.     AddCharset CP866        .cp866
  786.     AddCharset ISO-8859-5   .iso-ru
  787.     AddCharset KOI8-R       .koi8-r
  788.     AddCharset UCS-2        .ucs2
  789.     AddCharset UCS-4        .ucs4
  790.     AddCharset UTF-8        .utf8
  791.      
  792.     # LanguagePriority allows you to give precedence to some languages
  793.     # in case of a tie during content negotiation.
  794.     #
  795.     # Just list the languages in decreasing order of preference. We have
  796.     # more or less alphabetized them here. You probably want to change this.
  797.     #
  798.     <IfModule mod_negotiation.c>
  799.         LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
  800.     </IfModule>
  801.      
  802.     #
  803.     # AddType allows you to tweak mime.types without actually editing it, or to
  804.     # make certain files to be certain types.
  805.     #
  806.     AddType application/x-tar .tgz
  807. AddType image/x-icon .ico
  808. AddType application/x-httpd-php .php .php3
  809. AddType application/x-httpd-php-source .php5
  810.      
  811.     #  
  812.     # AddHandler allows you to map certain file extensions to "handlers",
  813.     # actions unrelated to filetype. These can be either built into the server
  814.     # or added with the Action command (see below)
  815.     #
  816.     # If you want to use server side includes, or CGI outside
  817.     # ScriptAliased directories, uncomment the following lines.
  818.     #  
  819.     # To use CGI scripts:
  820.     #
  821.     #AddHandler cgi-script .cgi   
  822.     #
  823.     # To use server-parsed HTML files
  824.     #
  825.     #AddType text/html .shtml
  826.     #AddHandler server-parsed .shtml
  827.      
  828.     #  
  829.     # Uncomment the following line to enable Apache's send-asis HTTP file
  830.     # feature
  831.     #  
  832.     #AddHandler send-as-is asis
  833.      
  834.     #
  835.     # If you wish to use server-parsed imagemap files, use
  836.     #
  837.     #AddHandler imap-file map
  838.      
  839.     #
  840.     # To enable type maps, you might want to use
  841.     #
  842.     #AddHandler type-map var
  843. </IfModule>
  844. # End of document types.
  845.        
  846. #
  847. # Action lets you define media types that will execute a script whenever
  848. # a matching file is called. This eliminates the need for repeated URL
  849. # pathnames for oft-used CGI file processors.
  850. # Format: Action media/type /cgi-script/location
  851. # Format: Action handler-name /cgi-script/location
  852. #   
  853.      
  854. #
  855. # MetaDir: specifies the name of the directory in which Apache can find
  856. # meta information files. These files contain additional HTTP headers
  857. # to include when sending the document
  858. #
  859. #MetaDir .web
  860.        
  861. #
  862. # MetaSuffix: specifies the file name suffix for the file containing the
  863. # meta information.
  864. #  
  865. #MetaSuffix .meta
  866. #   
  867. # Customizable error response (Apache style)
  868. #  these come in three flavors
  869. #  
  870. #    1) plain text
  871. #ErrorDocument 500 "The server made a boo boo.
  872. #  n.b.  the single leading (" ) marks it as text, it does not get output
  873. #
  874. #    2) local redirects
  875. #ErrorDocument 404 /missing.html
  876. #  to redirect to local URL /missing.html
  877. #ErrorDocument 404 /cgi-bin/missing_handler.pl
  878. #  N.B.: You can redirect to a script or a document using server-side-includes.
  879. #
  880. #    3) external redirects
  881. #ErrorDocument 402 http://some.other-server.com/subscription_info.html
  882. #  N.B.: Many of the environment variables associated with the original
  883. #  request will *not* be available to such a script.
  884.    
  885. #     
  886. # Customize behaviour based on the browser
  887. #   
  888. <IfModule mod_setenvif.c>
  889.     #
  890.     # The following directives modify normal HTTP response behavior.
  891.     # The first directive disables keepalive for Netscape 2.x and browsers that
  892.     # spoof it. There are known problems with these browser implementations.   
  893.     # The second directive is for Microsoft Internet Explorer 4.0b2
  894.     # which has a broken HTTP/1.1 implementation and does not properly
  895.     # support keepalive when it is used on 301 or 302 (redirect) responses.
  896.     #
  897.     BrowserMatch "Mozilla/2" nokeepalive
  898.     BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
  899.      
  900.     #
  901. # The following directive disables HTTP/1.1 responses to browsers which
  902.     # are in violation of the HTTP/1.0 spec by not being able to grok a
  903.     # basic 1.1 response.
  904.     #
  905.     BrowserMatch "RealPlayer 4\.0" force-response-1.0
  906.     BrowserMatch "Java/1\.0" force-response-1.0
  907.     BrowserMatch "JDK/1\.0" force-response-1.0
  908.      
  909. </IfModule>
  910. # End of browser customization directives
  911.      
  912. #
  913. # Allow server status reports, with the URL of http://servername/server-status
  914. # Change the ".your-domain.com" to match your domain to enable.
  915. #
  916. #<Location /server-status>
  917. #    SetHandler server-status
  918. #    Order deny,allow
  919. #    Deny from all
  920. #    Allow from .your-domain.com
  921. #</Location>
  922.      
  923. #   
  924. # Allow remote server configuration reports, with the URL of
  925. # http://servername/server-info (requires that mod_info.c be loaded).
  926. # Change the ".your-domain.com" to match your domain to enable.
  927. #
  928. #<Location /server-info>
  929. #    SetHandler server-info
  930. #    Order deny,allow
  931. #    Deny from all
  932. #    Allow from .your-domain.com
  933. #</Location>
  934. #     
  935. # There have been reports of people trying to abuse an old bug from pre-1.1
  936. # days.  This bug involved a CGI script distributed as a part of Apache.
  937. # By uncommenting these lines you can redirect these attacks to a logging
  938. # script on phf.apache.org.  Or, you can record them yourself, using the script
  939. # support/phf_abuse_log.cgi.
  940. #  
  941. #<Location /cgi-bin/phf*>
  942. #    Deny from all
  943. #    ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi
  944. #</Location>
  945. #     
  946. # Proxy Server directives. Uncomment the following lines to
  947. # enable the proxy server:
  948. #     
  949. #<IfModule mod_proxy.c>
  950. #    ProxyRequests On
  951. #    <Directory proxy:*>
  952. #        Order deny,allow   
  953. #        Deny from all
  954. #        Allow from .your-domain.com
  955. #    </Directory>  
  956.     #
  957. # Enable/disable the handling of HTTP/1.1 "Via:" headers.
  958.     # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
  959.     # Set to one of: Off | On | Full | Block
  960.     #
  961. #    ProxyVia On
  962.     #
  963.     # To enable the cache as well, edit and uncomment the following lines:
  964.     # (no cacheing without CacheRoot)
  965.     #
  966. #    CacheRoot "/private/var/run/proxy"
  967. #    CacheSize 5
  968. #    CacheGcInterval 4
  969. #    CacheMaxExpire 24
  970. #    CacheLastModifiedFactor 0.1
  971. #    CacheDefaultExpire 1
  972. #    NoCache a-domain.com another-domain.edu joes.garage-sale.com
  973.      
  974. #</IfModule>
  975. # End of proxy directives.
  976. ### Section 3: Virtual Hosts
  977. #
  978. # VirtualHost: If you want to maintain multiple domains/hostnames on your
  979. # machine you can setup VirtualHost containers for them. Most configurations
  980. # use only name-based virtual hosts so the server doesn't need to worry about
  981. # IP addresses. This is indicated by the asterisks in the directives below.
  982. #     
  983. # Please see the documentation at <URL:http://www.apache.org/docs/vhosts/>
  984. # for further details before you try to setup virtual hosts.
  985. #     
  986. # You may use the command line option '-S' to verify your virtual host
  987. # configuration.
  988. #  
  989. # Use name-based virtual hosting.
  990. #
  991. #NameVirtualHost *
  992. #  
  993. # VirtualHost example:
  994. # Almost any Apache directive may go into a VirtualHost container.
  995. # The first VirtualHost section is used for requests without a known
  996. # server name.
  997. #  
  998. #<VirtualHost *>
  999. #    ServerAdmin webmaster@dummy-host.example.com
  1000. #    DocumentRoot /www/docs/dummy-host.example.com
  1001. #    ServerName dummy-host.example.com
  1002. #    ErrorLog logs/dummy-host.example.com-error_log
  1003. #    CustomLog logs/dummy-host.example.com-access_log common
  1004. #</VirtualHost>
  1005. Include /private/etc/httpd/users


 
j'ai pensé à un problème de droit d'accès sur mon disque "data" m
 
 
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Linux et OS Alternatifs
  Codes et scripts

  changement du répertoire racine d'apache macOS X

 

Sujets relatifs
Apache 2 : Server-Pool Size RegulationDebian sarge Apache 2 et DSO
Accès site Intranet Apache impossible[résolu] [Apache] erreur 403 à l'affichage des stats awstats
créer un répertoire pour tous les utilisateurs[MacOs]Help - Urgent Problème d'affichage
debian: apache ne se lance plusMettre dans une variable DOS le fichier trouvé dans un répertoire
Insérer une signature au format HTML dans mail sous MacOS XPetit serveur Apache PHP MySQL. Fonction mail ne marche pas.
Plus de sujets relatifs à : changement du répertoire racine d'apache macOS X


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR