Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
5888 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. # 
  385. # UserDir: The name of the directory which is appended onto a user's home
  386. # directory if a ~user request is received.
  387. #
  388. <IfModule mod_userdir.c> 
  389.     UserDir Sites
  390. DirectoryIndex index.php3 index.php index.html
  391. </IfModule>
  392.  
  393. #
  394. # Control access to UserDir directories.  The following is an example
  395. # for a site where these directories are restricted to read-only.
  396. #
  397. #<Directory /home/*/Sites>
  398. #    AllowOverride FileInfo AuthConfig Limit
  399. #    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
  400. #    <Limit GET POST OPTIONS PROPFIND>
  401. #        Order allow,deny
  402. #        Allow from all
  403. #    </Limit>
  404. #    <LimitExcept GET POST OPTIONS PROPFIND>
  405. #        Order deny,allow
  406. #        Deny from all
  407. #    </LimitExcept>
  408. #</Directory>
  409. #
  410. # DirectoryIndex: Name of the file or files to use as a pre-written HTML
  411. # directory index.  Separate multiple entries with spaces.
  412. #   
  413. <IfModule mod_dir.c>
  414.     DirectoryIndex index.html
  415. </IfModule>
  416. #   
  417. # AccessFileName: The name of the file to look for in each directory
  418. # for access control information.
  419. #       
  420. AccessFileName .htaccess
  421. #
  422. # The following lines prevent .htaccess files from being viewed by
  423. # Web clients.  Since .htaccess files often contain authorization
  424. # information, access is disallowed for security reasons.  Comment
  425. # these lines out if you want Web visitors to see the contents of
  426. # .htaccess files.  If you change the AccessFileName directive above,
  427. # be sure to make the corresponding changes here.
  428. #
  429. # Also, folks tend to use names such as .htpasswd for password
  430. # files, so this will protect those as well.
  431. #
  432. <Files ~ "^\.ht">
  433.     Order allow,deny
  434.     Deny from all
  435.     Satisfy All
  436. </Files>
  437. #
  438. # CacheNegotiatedDocs: By default, Apache sends "Pragma: no-cache" with each
  439. # document that was negotiated on the basis of content. This asks proxy
  440. # servers not to cache the document. Uncommenting the following line disables
  441. # this behavior, and proxies will be allowed to cache the documents.
  442. #
  443. #CacheNegotiatedDocs
  444. #
  445. # UseCanonicalName:  (new for 1.3)  With this setting turned on, whenever
  446. # Apache needs to construct a self-referencing URL (a URL that refers back
  447. # to the server the response is coming from) it will use ServerName and
  448. # Port to form a "canonical" name.  With this setting off, Apache will
  449. # use the hostname:port that the client supplied, when possible.  This
  450. # also affects SERVER_NAME and SERVER_PORT in CGI scripts.
  451. #
  452. UseCanonicalName On
  453. #
  454. # TypesConfig describes where the mime.types file (or equivalent) is
  455. # to be found.
  456. #
  457. <IfModule mod_mime.c>
  458.     TypesConfig /private/etc/httpd/mime.types
  459. </IfModule>
  460. #
  461. # DefaultType is the default MIME type the server will use for a document
  462. # if it cannot otherwise determine one, such as from filename extensions.
  463. # If your server contains mostly text or HTML documents, "text/plain" is
  464. # a good value.  If most of your content is binary, such as applications
  465. # or images, you may want to use "application/octet-stream" instead to
  466. # keep browsers from trying to display binary files as though they are
  467. # text.
  468. #
  469. DefaultType text/plain
  470. #
  471. # The mod_mime_magic module allows the server to use various hints from the
  472. # contents of the file itself to determine its type.  The MIMEMagicFile
  473. # directive tells the module where the hint definitions are located.
  474. # mod_mime_magic is not part of the default server (you have to add
  475. # it yourself with a LoadModule [see the DSO paragraph in the 'Global
  476. # Environment' section], or recompile the server and include mod_mime_magic
  477. # as part of the configuration), so it's enclosed in an <IfModule> container.
  478. # This means that the MIMEMagicFile directive will only be processed if the
  479. # module is part of the server.
  480. #
  481. <IfModule mod_mime_magic.c>
  482.     MIMEMagicFile /private/etc/httpd/magic
  483. </IfModule>
  484. #
  485. # HostnameLookups: Log the names of clients or just their IP addresses
  486. # e.g., www.apache.org (on) or 204.62.129.132 (off).
  487. # The default is off because it'd be overall better for the net if people
  488. # had to knowingly turn this feature on, since enabling it means that
  489. # each client request will result in AT LEAST one lookup request to the
  490. # nameserver.
  491. #
  492. HostnameLookups Off
  493. #
  494. # ErrorLog: The location of the error log file.
  495. # If you do not specify an ErrorLog directive within a <VirtualHost>
  496. # container, error messages relating to that virtual host will be
  497. # logged here.  If you *do* define an error logfile for a <VirtualHost>
  498. # container, that host's errors will be logged there and not here.
  499. #
  500. ErrorLog "/private/var/log/httpd/error_log"
  501. #
  502. # LogLevel: Control the number of messages logged to the error_log.
  503. # Possible values include: debug, info, notice, warn, error, crit,
  504. # alert, emerg.
  505. #
  506. LogLevel warn
  507.  
  508. #
  509. # The following directives define some format nicknames for use with
  510. # a CustomLog directive (see below).
  511. #
  512. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  513. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  514. LogFormat "%{Referer}i -> %U" referer
  515. LogFormat "%{User-agent}i" agent
  516.  
  517. #
  518. # The location and format of the access logfile (Common Logfile Format).
  519. # If you do not define any access logfiles within a <VirtualHost>
  520. # container, they will be logged here.  Contrariwise, if you *do*
  521. # define per-<VirtualHost> access logfiles, transactions will be
  522. # logged therein and *not* in this file.
  523. #
  524. CustomLog "/private/var/log/httpd/access_log" common
  525. #
  526. # If you would like to have agent and referer logfiles, uncomment the
  527. # following directives.
  528. #
  529. #CustomLog "/private/var/log/httpd/referer_log" referer
  530. #CustomLog "/private/var/log/httpd/agent_log" agent
  531.  
  532. #
  533. # If you prefer a single logfile with access, agent, and referer information
  534. # (Combined Logfile Format) you can use the following directive.
  535. #
  536. #CustomLog "/private/var/log/httpd/access_log" combined
  537.  
  538. #
  539. # Optionally add a line containing the server version and virtual host
  540. # name to server-generated pages (error documents, FTP directory listings,
  541. # mod_status and mod_info output etc., but not CGI generated documents).
  542. # Set to "EMail" to also include a mailto: link to the ServerAdmin.
  543. # Set to one of:  On | Off | EMail
  544. #
  545. ServerSignature On
  546.  
  547. # EBCDIC configuration:
  548. # (only for mainframes using the EBCDIC codeset, currently one of:
  549. # Fujitsu-Siemens' BS2000/OSD, IBM's OS/390 and IBM's TPF)!!
  550. # The following default configuration assumes that "text files"
  551. # are stored in EBCDIC (so that you can operate on them using the
  552. # normal POSIX tools like grep and sort) while "binary files" are
  553. # stored with identical octets as on an ASCII machine.
  554. #
  555. # The directives are evaluated in configuration file order, with
  556. # the EBCDICConvert directives applied before EBCDICConvertByType.
  557. #
  558. # If you want to have ASCII HTML documents and EBCDIC HTML documents
  559. # at the same time, you can use the file extension to force
  560. # conversion off for the ASCII documents:
  561. # > AddType       text/html .ahtml
  562. # > EBCDICConvert Off=InOut .ahtml
  563. #
  564. # EBCDICConvertByType  On=InOut text/* message/* multipart/*
  565. # EBCDICConvertByType  On=In    application/x-www-form-urlencoded
  566. # EBCDICConvertByType  On=InOut application/postscript model/vrml
  567. # EBCDICConvertByType Off=InOut */*
  568.    
  569. #  
  570. # Aliases: Add here as many aliases as you need (with no limit). The format is
  571. # Alias fakename realname
  572. #  
  573. <IfModule mod_alias.c>
  574.     #
  575.     # Note that if you include a trailing / on fakename then the server will
  576.     # require it to be present in the URL.  So "/icons" isn't aliased in this
  577.     # example, only "/icons/".  If the fakename is slash-terminated, then the
  578.     # realname must also be slash terminated, and if the fakename omits the
  579.     # trailing slash, the realname must also omit it.
  580.     #
  581.     Alias /icons/ "/usr/share/httpd/icons/"
  582.    
  583.     <Directory "/usr/share/httpd/icons">
  584.         Options Indexes MultiViews
  585.  AllowOverride None
  586.         Order allow,deny
  587.         Allow from all
  588.     </Directory>
  589.      
  590.     # This Alias will project the on-line documentation tree under /manual/  
  591.     # even if you change the DocumentRoot. Comment it if you don't want to   
  592.     # provide access to the on-line documentation.
  593.     #  
  594.     Alias /manual/ "/Library/WebServer/Documents/manual/"
  595.      
  596.     <Directory "/Library/WebServer/Documents/manual">
  597.         Options Indexes FollowSymlinks MultiViews
  598.         AllowOverride None
  599.         Order allow,deny
  600.         Allow from all
  601.     </Directory>
  602.          
  603.     #
  604.     # ScriptAlias: This controls which directories contain server scripts.
  605.     # ScriptAliases are essentially the same as Aliases, except that
  606.     # documents in the realname directory are treated as applications and     
  607.     # run by the server when requested rather than as documents sent to the client.
  608.     # The same rules about trailing "/" apply to ScriptAlias directives as to
  609.     # Alias.
  610.     #
  611.     ScriptAlias /cgi-bin/ "/Library/WebServer/CGI-Executables/"
  612.          
  613.     #
  614.     # "/Library/WebServer/CGI-Executables" should be changed to whatever your ScriptAliased
  615.     # CGI directory exists, if you have that configured.
  616.     #
  617.     <Directory "/Library/WebServer/CGI-Executables">
  618.         AllowOverride None
  619.         Options None
  620.         Order allow,deny
  621.         Allow from all
  622.     </Directory>
  623.      
  624. </IfModule>  
  625. # End of aliases.
  626.      
  627. #
  628. # Redirect allows you to tell clients about documents which used to exist in
  629. # your server's namespace, but do not anymore. This allows you to tell the
  630. # clients where to look for the relocated document.
  631. # Format: Redirect old-URI new-URL
  632. #
  633.          
  634. #
  635. # Directives controlling the display of server-generated directory listings.
  636. #
  637. <IfModule mod_autoindex.c>
  638.      
  639.     #
  640.     # FancyIndexing is whether you want fancy directory indexing or standard
  641.     #
  642.     IndexOptions FancyIndexing
  643. #
  644.     # AddIcon* directives tell the server which icon to show for different
  645.     # files or filename extensions.  These are only displayed for
  646.     # FancyIndexed directories.
  647.     #   
  648.     AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
  649.     AddIconByType (TXT,/icons/text.gif) text/*
  650.     AddIconByType (IMG,/icons/image2.gif) image/*
  651.     AddIconByType (SND,/icons/sound2.gif) audio/*
  652.     AddIconByType (VID,/icons/movie.gif) video/*
  653.      
  654.     AddIcon /icons/binary.gif .bin .exe
  655.     AddIcon /icons/binhex.gif .hqx
  656.     AddIcon /icons/tar.gif .tar
  657.     AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
  658.     AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
  659.     AddIcon /icons/a.gif .ps .ai .eps
  660.     AddIcon /icons/layout.gif .html .shtml .htm .pdf
  661.     AddIcon /icons/text.gif .txt
  662.     AddIcon /icons/c.gif .c
  663.     AddIcon /icons/p.gif .pl .py
  664.     AddIcon /icons/f.gif .for
  665.     AddIcon /icons/dvi.gif .dvi
  666.     AddIcon /icons/uuencoded.gif .uu
  667.     AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
  668.     AddIcon /icons/tex.gif .tex
  669.     AddIcon /icons/bomb.gif core
  670.      
  671.     AddIcon /icons/back.gif ..  
  672.     AddIcon /icons/hand.right.gif README
  673.     AddIcon /icons/folder.gif ^^DIRECTORY^^
  674.     AddIcon /icons/blank.gif ^^BLANKICON^^
  675.      
  676.     #
  677.     # DefaultIcon is which icon to show for files which do not have an icon
  678.     # explicitly set.
  679.     #
  680.     DefaultIcon /icons/unknown.gif
  681.      
  682.     #
  683.     # AddDescription allows you to place a short description after a file in
  684.     # server-generated indexes.  These are only displayed for FancyIndexed
  685.     # directories.
  686.     # Format: AddDescription "description" filename
  687.     #
  688.     #AddDescription "GZIP compressed document" .gz
  689.     #AddDescription "tar archive" .tar
  690.     #AddDescription "GZIP compressed tar archive" .tgz
  691.      
  692.     #  
  693.     # ReadmeName is the name of the README file the server will look for by
  694.     # default, and append to directory listings.
  695.     #
  696.     # HeaderName is the name of a file which should be prepended to
  697.     # directory indexes.
  698.     #  
  699.     # If MultiViews are amongst the Options in effect, the server will
  700.     # first look for name.html and include it if found.  If name.html
  701.     # doesn't exist, the server will then look for name.txt and include
  702.     # it as plaintext if found.
  703.     #
  704.     ReadmeName README
  705.     HeaderName HEADER
  706.      
  707.     #  
  708.     # IndexIgnore is a set of filenames which directory indexing should ignore
  709.     # and not include in the listing.  Shell-style wildcarding is permitted.
  710.     #
  711.     IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
  712.      
  713. </IfModule>
  714. # End of indexing directives.
  715.      
  716. #
  717. # Document types.
  718. #
  719. <IfModule mod_mime.c>
  720.      
  721.     #
  722.     # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
  723.     # information on the fly. Note: Not all browsers support this.
  724.     # Despite the name similarity, the following Add* directives have nothing
  725.     # to do with the FancyIndexing customization directives above.
  726.     #
  727.     AddEncoding x-compress Z
  728.     AddEncoding x-gzip gz tgz
  729.     #
  730.     # AddLanguage allows you to specify the language of a document. You can
  731.     # then use content negotiation to give a browser a file in a language
  732.     # it can understand.
  733.     #
  734.     # Note 1: The suffix does not have to be the same as the language
  735.     # keyword --- those with documents in Polish (whose net-standard
  736.     # language code is pl) may wish to use "AddLanguage pl .po" to
  737.     # avoid the ambiguity with the common suffix for perl scripts.
  738.     #  
  739.     # Note 2: The example entries below illustrate that in quite   
  740.     # some cases the two character 'Language' abbreviation is not
  741.     # identical to the two character 'Country' code for its country,
  742.     # E.g. 'Danmark/dk' versus 'Danish/da'.
  743.     #
  744.     # Note 3: In the case of 'ltz' we violate the RFC by using a three char
  745.     # specifier. But there is 'work in progress' to fix this and get
  746.     # the reference data for rfc1766 cleaned up.
  747.     #  
  748.     # Danish (da) - Dutch (nl) - English (en) - Estonian (ee)
  749.     # French (fr) - German (de) - Greek-Modern (el)
  750.     # Italian (it) - Korean (kr) - Norwegian (no) - Norwegian Nynorsk (nn)
  751.     # Portugese (pt) - Luxembourgeois* (ltz)
  752.     # Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cz)
  753.     # Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)
  754.     # Russian (ru)
  755.     #  
  756.     AddLanguage da .dk
  757.     AddLanguage nl .nl
  758.     AddLanguage en .en
  759.     AddLanguage et .ee
  760.     AddLanguage fr .fr
  761.     AddLanguage de .de
  762.     AddLanguage el .el
  763.     AddLanguage he .he
  764.     AddCharset ISO-8859-8 .iso8859-8
  765.     AddLanguage it .it
  766.     AddLanguage ja .ja
  767.     AddCharset ISO-2022-JP .jis
  768.     AddLanguage kr .kr
  769.     AddCharset ISO-2022-KR .iso-kr
  770.     AddLanguage nn .nn
  771.     AddLanguage no .no
  772.     AddLanguage pl .po
  773.     AddCharset ISO-8859-2 .iso-pl
  774.     AddLanguage pt .pt
  775.     AddLanguage pt-br .pt-br
  776.     AddLanguage ltz .lu
  777.     AddLanguage ca .ca
  778.     AddLanguage es .es
  779.     AddLanguage sv .sv
  780.     AddLanguage cz .cz
  781.     AddLanguage ru .ru
  782.     AddLanguage zh-tw .tw
  783.     AddLanguage tw .tw
  784.     AddCharset Big5         .Big5    .big5
  785.     AddCharset WINDOWS-1251 .cp-1251
  786.     AddCharset CP866        .cp866
  787.     AddCharset ISO-8859-5   .iso-ru
  788.     AddCharset KOI8-R       .koi8-r
  789.     AddCharset UCS-2        .ucs2
  790.     AddCharset UCS-4        .ucs4
  791.     AddCharset UTF-8        .utf8
  792.      
  793.     # LanguagePriority allows you to give precedence to some languages
  794.     # in case of a tie during content negotiation.
  795.     #
  796.     # Just list the languages in decreasing order of preference. We have
  797.     # more or less alphabetized them here. You probably want to change this.
  798.     #
  799.     <IfModule mod_negotiation.c>
  800.         LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
  801.     </IfModule>
  802.      
  803.     #
  804.     # AddType allows you to tweak mime.types without actually editing it, or to
  805.     # make certain files to be certain types.
  806.     #
  807.     AddType application/x-tar .tgz
  808. AddType image/x-icon .ico
  809. AddType application/x-httpd-php .php .php3
  810. AddType application/x-httpd-php-source .php5
  811.      
  812.     #  
  813.     # AddHandler allows you to map certain file extensions to "handlers",
  814.     # actions unrelated to filetype. These can be either built into the server
  815.     # or added with the Action command (see below)
  816.     #
  817.     # If you want to use server side includes, or CGI outside
  818.     # ScriptAliased directories, uncomment the following lines.
  819.     #  
  820.     # To use CGI scripts:
  821.     #
  822.     #AddHandler cgi-script .cgi   
  823.     #
  824.     # To use server-parsed HTML files
  825.     #
  826.     #AddType text/html .shtml
  827.     #AddHandler server-parsed .shtml
  828.      
  829.     #  
  830.     # Uncomment the following line to enable Apache's send-asis HTTP file
  831.     # feature
  832.     #  
  833.     #AddHandler send-as-is asis
  834.      
  835.     #
  836.     # If you wish to use server-parsed imagemap files, use
  837.     #
  838.     #AddHandler imap-file map
  839.      
  840.     #
  841.     # To enable type maps, you might want to use
  842.     #
  843.     #AddHandler type-map var
  844. </IfModule>
  845. # End of document types.
  846.        
  847. #
  848. # Action lets you define media types that will execute a script whenever
  849. # a matching file is called. This eliminates the need for repeated URL
  850. # pathnames for oft-used CGI file processors.
  851. # Format: Action media/type /cgi-script/location
  852. # Format: Action handler-name /cgi-script/location
  853. #   
  854.      
  855. #
  856. # MetaDir: specifies the name of the directory in which Apache can find
  857. # meta information files. These files contain additional HTTP headers
  858. # to include when sending the document
  859. #
  860. #MetaDir .web
  861.        
  862. #
  863. # MetaSuffix: specifies the file name suffix for the file containing the
  864. # meta information.
  865. #  
  866. #MetaSuffix .meta
  867. #   
  868. # Customizable error response (Apache style)
  869. #  these come in three flavors
  870. #  
  871. #    1) plain text
  872. #ErrorDocument 500 "The server made a boo boo.
  873. #  n.b.  the single leading (" ) marks it as text, it does not get output
  874. #
  875. #    2) local redirects
  876. #ErrorDocument 404 /missing.html
  877. #  to redirect to local URL /missing.html
  878. #ErrorDocument 404 /cgi-bin/missing_handler.pl
  879. #  N.B.: You can redirect to a script or a document using server-side-includes.
  880. #
  881. #    3) external redirects
  882. #ErrorDocument 402 http://some.other-server.com/subscription_info.html
  883. #  N.B.: Many of the environment variables associated with the original
  884. #  request will *not* be available to such a script.
  885.    
  886. #     
  887. # Customize behaviour based on the browser
  888. #   
  889. <IfModule mod_setenvif.c>
  890.     #
  891.     # The following directives modify normal HTTP response behavior.
  892.     # The first directive disables keepalive for Netscape 2.x and browsers that
  893.     # spoof it. There are known problems with these browser implementations.   
  894.     # The second directive is for Microsoft Internet Explorer 4.0b2
  895.     # which has a broken HTTP/1.1 implementation and does not properly
  896.     # support keepalive when it is used on 301 or 302 (redirect) responses.
  897.     #
  898.     BrowserMatch "Mozilla/2" nokeepalive
  899.     BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
  900.      
  901.     #
  902. # The following directive disables HTTP/1.1 responses to browsers which
  903.     # are in violation of the HTTP/1.0 spec by not being able to grok a
  904.     # basic 1.1 response.
  905.     #
  906.     BrowserMatch "RealPlayer 4\.0" force-response-1.0
  907.     BrowserMatch "Java/1\.0" force-response-1.0
  908.     BrowserMatch "JDK/1\.0" force-response-1.0
  909.      
  910. </IfModule>
  911. # End of browser customization directives
  912.      
  913. #
  914. # Allow server status reports, with the URL of http://servername/server-status
  915. # Change the ".your-domain.com" to match your domain to enable.
  916. #
  917. #<Location /server-status>
  918. #    SetHandler server-status
  919. #    Order deny,allow
  920. #    Deny from all
  921. #    Allow from .your-domain.com
  922. #</Location>
  923.      
  924. #   
  925. # Allow remote server configuration reports, with the URL of
  926. # http://servername/server-info (requires that mod_info.c be loaded).
  927. # Change the ".your-domain.com" to match your domain to enable.
  928. #
  929. #<Location /server-info>
  930. #    SetHandler server-info
  931. #    Order deny,allow
  932. #    Deny from all
  933. #    Allow from .your-domain.com
  934. #</Location>
  935. #     
  936. # There have been reports of people trying to abuse an old bug from pre-1.1
  937. # days.  This bug involved a CGI script distributed as a part of Apache.
  938. # By uncommenting these lines you can redirect these attacks to a logging
  939. # script on phf.apache.org.  Or, you can record them yourself, using the script
  940. # support/phf_abuse_log.cgi.
  941. #  
  942. #<Location /cgi-bin/phf*>
  943. #    Deny from all
  944. #    ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi
  945. #</Location>
  946. #     
  947. # Proxy Server directives. Uncomment the following lines to
  948. # enable the proxy server:
  949. #     
  950. #<IfModule mod_proxy.c>
  951. #    ProxyRequests On
  952. #    <Directory proxy:*>
  953. #        Order deny,allow   
  954. #        Deny from all
  955. #        Allow from .your-domain.com
  956. #    </Directory>  
  957.     #
  958. # Enable/disable the handling of HTTP/1.1 "Via:" headers.
  959.     # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
  960.     # Set to one of: Off | On | Full | Block
  961.     #
  962. #    ProxyVia On
  963.     #
  964.     # To enable the cache as well, edit and uncomment the following lines:
  965.     # (no cacheing without CacheRoot)
  966.     #
  967. #    CacheRoot "/private/var/run/proxy"
  968. #    CacheSize 5
  969. #    CacheGcInterval 4
  970. #    CacheMaxExpire 24
  971. #    CacheLastModifiedFactor 0.1
  972. #    CacheDefaultExpire 1
  973. #    NoCache a-domain.com another-domain.edu joes.garage-sale.com
  974.      
  975. #</IfModule>
  976. # End of proxy directives.
  977. ### Section 3: Virtual Hosts
  978. #
  979. # VirtualHost: If you want to maintain multiple domains/hostnames on your
  980. # machine you can setup VirtualHost containers for them. Most configurations
  981. # use only name-based virtual hosts so the server doesn't need to worry about
  982. # IP addresses. This is indicated by the asterisks in the directives below.
  983. #     
  984. # Please see the documentation at <URL:http://www.apache.org/docs/vhosts/>
  985. # for further details before you try to setup virtual hosts.
  986. #     
  987. # You may use the command line option '-S' to verify your virtual host
  988. # configuration.
  989. #  
  990. # Use name-based virtual hosting.
  991. #
  992. #NameVirtualHost *
  993. #  
  994. # VirtualHost example:
  995. # Almost any Apache directive may go into a VirtualHost container.
  996. # The first VirtualHost section is used for requests without a known
  997. # server name.
  998. #  
  999. #<VirtualHost *>
  1000. #    ServerAdmin webmaster@dummy-host.example.com
  1001. #    DocumentRoot /www/docs/dummy-host.example.com
  1002. #    ServerName dummy-host.example.com
  1003. #    ErrorLog logs/dummy-host.example.com-error_log
  1004. #    CustomLog logs/dummy-host.example.com-access_log common
  1005. #</VirtualHost>
  1006. 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-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)