Recursivité des .htaccess

Recursivité des .htaccess - HTML/CSS - Programmation

Marsh Posté le 31-07-2004 à 18:16:04    

Hello,
 
J'ai un serveur http protégé contre les accès exterieurs anonymes  
 

Code :
  1. AuthUserFile "d:\extens~1\WebSer~1\Docume~1\.htpasswd"
  2. AuthGroupFile /dev/null
  3. AuthName "Accès sécurisé au site ALPAC"
  4. AuthType Basic
  5. <LIMIT GET POST>
  6. order deny,allow
  7. deny from all
  8. allow from 192.168.0
  9. Require valid-user
  10. Satisfy any
  11. </LIMIT>


 
 
Maintenant je désire créer un répertoire enfant, qui lui ne serait pas protégé du tout (pas de demande de login depuis l'exterieur)
 
 
J'ai donc testé plusieurs choses mais la seule chose au mieux que j'ai reussi a faire c'est l'affichage de la fenetre de login. Bien evidemment il suffit de ne rien rentrer pour entrer.
 
 

Code :
  1. allow from all
  2. Satisfy any


 
 
Comment je peux faire pour qu'il ne demande strictement rien ?

Reply

Marsh Posté le 31-07-2004 à 18:16:04   

Reply

Marsh Posté le 31-07-2004 à 18:30:01    

et si tu definissais ton repertoire a part dans le httpd.conf:
 
<Directory "/le repertoire">
Allow from all
Satisfy any
</Directory>
 
la config est plus claire, non?


---------------
IVG en france
Reply

Marsh Posté le 31-07-2004 à 18:44:03    

je viens de le mettre en place :
confirme-tu qu'aucune identification n'est demandée, et que la page s'affiche ?
http://alpac.dyndns.org:81/coupleur/

Reply

Marsh Posté le 31-07-2004 à 18:46:07    

non :/
j'ai un popup htaccess mais si je fais cancel, je vois une page:
"Bienvenue sur la page de démonstration de télémaintenance d'un coupleur SIEMENS.
Pour pouvoir y accéder, vous devez vous inscrire (gratuitement) afin d'obtenir un mot de passe."
 
:/


---------------
IVG en france
Reply

Marsh Posté le 31-07-2004 à 18:46:13    

J'ai les deux: une page avec login et une demande de login en http

Reply

Marsh Posté le 31-07-2004 à 18:47:04    

Pas bon alors.. :(

Reply

Marsh Posté le 31-07-2004 à 18:47:56    

La page d'identification SIEMENS est normale. C'est celle qu'on doit voir quand on tape l'adresse, mais sans demande de login htaccess..

Reply

Marsh Posté le 31-07-2004 à 18:50:15    

Je viens de rajouter un "AllowOverride None"... test concluant ?

Reply

Marsh Posté le 31-07-2004 à 18:51:08    

non pareil :/


---------------
IVG en france
Reply

Marsh Posté le 31-07-2004 à 18:56:22    

et la ?

Reply

Marsh Posté le 31-07-2004 à 18:56:22   

Reply

Marsh Posté le 31-07-2004 à 18:57:38    

j'ai quand meme une demande de login genre htaccess au nom de prompt qui vient meme si la page se charge de suite (sans avoir a faire cancel)


---------------
IVG en france
Reply

Marsh Posté le 31-07-2004 à 18:58:12    

pareil

Reply

Marsh Posté le 31-07-2004 à 19:01:35    

Oui, c'est le mieux que j'ai reussi à faire.
On peut mettre ce qu'on veut vu que ça ne va pas chercher des informations propres à l'intranet, mais à la gueule du client, ça serait mieux qu'il n'y ait pas de fenetre htacces... :/

Reply

Marsh Posté le 31-07-2004 à 19:05:13    

sinon question con: pourquoi avoir utilisé <LIMIT>?

Reply

Marsh Posté le 31-07-2004 à 19:07:28    

Surement une vieille habitude.
 
Il y a un exemple dans le httpd.conf :
 

Code :
  1. #<Directory "D:/Extension_C/WebServer/Apache/Apache/users">
  2. #    AllowOverride FileInfo AuthConfig Limit
  3. #    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
  4. #    <Limit GET POST OPTIONS PROPFIND>
  5. #        Order allow,deny
  6. #        Allow from all
  7. #    </Limit>
  8. #    <LimitExcept GET POST OPTIONS PROPFIND>
  9. #        Order deny,allow
  10. #        Deny from all
  11. #    </LimitExcept>
  12. #</Directory>


 
+ URL ou j'ai appris le bazard :whistle:
http://www.commentcamarche.net/apache/apacht.php3
 

Reply

Marsh Posté le 31-07-2004 à 19:09:43    

Update... rajout de "Options None"

Reply

Marsh Posté le 31-07-2004 à 19:11:08    

ok, dans ce cas, deuxième question con: as-tu mis le AllowOverride?

Reply

Marsh Posté le 31-07-2004 à 19:13:06    

skylight a écrit :

Je viens de rajouter un "AllowOverride None"... test concluant ?

Ceci :??:
 
(théoriquement, AllowOverride None désactive les htaccess dans le répertoire concerné...)

Reply

Marsh Posté le 31-07-2004 à 19:47:30    

skylight a écrit :

Ceci :??:
 
(théoriquement, AllowOverride None désactive les htaccess dans le répertoire concerné...)


 
Oui ça. Mais si tu le mets, vu que ça desactive les .htacces je ne vois pas pourquoi tu voudrais que la demande de login disparaisse.
 
Tu peux mettre ton httpd.conf en complet ainsi que le .htaccess, si tu en as un, du répertoire concerné?

Reply

Marsh Posté le 31-07-2004 à 19:50:42    

Je veux pas de demande de login, je veux que ce repertoire soit libre d'accès, c'est tout :D
 
Httpd.conf
 

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


 
 
.htaccess du repértoire coupleur :
 

Code :
  1. <Files adm.php>
  2. AuthUserFile "d:\extens~1\WebSer~1\Docume~1\.htpasswd"
  3. AuthGroupFile /dev/null
  4. AuthName "Accès sécurisé au site ALPAC"
  5. AuthType Basic
  6. <LIMIT GET POST>
  7. order deny,allow
  8. deny from all
  9. Require valid-user
  10. Satisfy any
  11. </LIMIT>
  12. </Files>


(donc juste pour un fichier.
 
.htaccess de la racine :
 

Code :
  1. AuthUserFile "d:\extens~1\WebSer~1\Docume~1\.htpasswd"
  2. AuthGroupFile /dev/null
  3. AuthName "Accès sécurisé au site ALPAC"
  4. AuthType Basic
  5. <LIMIT GET POST>
  6. order deny,allow
  7. deny from all
  8. allow from 192.168.0
  9. Require valid-user
  10. Satisfy any
  11. </LIMIT>

Reply

Marsh Posté le 31-07-2004 à 20:05:04    

t'aurais pu virer les commentaires :sweat:

Reply

Marsh Posté le 31-07-2004 à 20:08:06    

Flemme :D
 
Bon j'ai foutu les 2 regles htaccess directement dans le httpd.conf, ca devrait etre bon la.

Reply

Marsh Posté le 31-07-2004 à 20:09:11    

je fous tout dans le httpd.conf sur mon propre serveur en fait moi :/
 
edit: ah bah voilà :D
 
edit2: j'ai encore le prompt :/


Message édité par uriel le 31-07-2004 à 20:10:08

---------------
IVG en france
Reply

Marsh Posté le 31-07-2004 à 20:13:22    

un truc comme ça dans le httpd.conf:


<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
 
 
<Directory "/var/www/html">
 
MultiViews
 
Options Indexes FollowSymLinks ExecCGI
 
AllowOverride None
Order allow,deny
Allow from all
 
</Directory>
 
#Test directory
 
<Directory "/var/www/html/test">
AllowOverride All
</Directory>


 
et chaque fois des regles comme ça, c'est fastidieux mais au moins c'est clair :D


Message édité par uriel le 31-07-2004 à 20:15:15

---------------
IVG en france
Reply

Marsh Posté le 31-07-2004 à 20:16:14    

Il sert a quoi ton parametre MultiViews ?

Reply

Marsh Posté le 31-07-2004 à 20:32:52    

skylight a écrit :

Flemme :D
 
Bon j'ai foutu les 2 regles htaccess directement dans le httpd.conf, ca devrait etre bon la.

Je sais pas comment tu les as inclus, mais en tout cas, le seul pour lequel il ne demande rien, c'est adm.php :/

Reply

Marsh Posté le 31-07-2004 à 20:48:14    

skylight a écrit :

Il sert a quoi ton parametre MultiViews ?


 
c'est un parametre qui etait là par defaut, ca sert principalement à ça:
http://httpd.apache.org/docs/content-negotiation.html
(en clair, ça permet de proposer differentes possibilité pour un meme document qui s'adapte au client)


---------------
IVG en france
Reply

Marsh Posté le    

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed