EasyPHP et htacces, prob de path ?

EasyPHP et htacces, prob de path ? - Windows & Software

Marsh Posté le 24-07-2002 à 12:08:18    

J'ai du mal à configurer mon .htacces sous Windows :

Code :
  1. AuthUserFile c:\program files\easyphp\www\.htpasswd
  2. AuthName "Accès protégé"
  3. AuthType Basic
  4. <limit GET POST>
  5. require valid-user 
  6. </limit>


= erreur 500
C'est chiant sous Windows ça, il faut mettre quoi en path ?

Reply

Marsh Posté le 24-07-2002 à 12:08:18   

Reply

Marsh Posté le 24-07-2002 à 12:49:05    

zekill a écrit a écrit :

J'ai du mal à configurer mon .htacces sous Windows :

Code :
  1. AuthUserFile c:\program files\easyphp\www\.htpasswd
  2. AuthName "Accès protégé"
  3. AuthType Basic
  4. <limit GET POST>
  5. require valid-user 
  6. </limit>


= erreur 500
C'est chiant sous Windows ça, il faut mettre quoi en path ?  




faut rajouter les guillemets si je ne m'abuse :)
ensuite bien sur que le chemin du fichier contenant les pass corresponde :)

Reply

Marsh Posté le 24-07-2002 à 12:56:10    

:jap:  Merci , c'est bien ça.
Puis il faut pas crypter les mots de passe, pas terrible au niveau securité !

Reply

Marsh Posté le 24-07-2002 à 13:21:11    

zekill a écrit a écrit :

 :jap:  Merci , c'est bien ça.
Puis il faut pas crypter les mots de passe, pas terrible au niveau securité !




sisi tu peux les crypter :)

Reply

Marsh Posté le 24-07-2002 à 13:23:06    

Je confirme, on peux crypter les mots de pass
 

Reply

Marsh Posté le 24-07-2002 à 13:26:53    

il faut changer des parametres de Apache alors car chez moi, ca passe seulement en clair !

Reply

Marsh Posté le 24-07-2002 à 13:40:08    

zekill a écrit a écrit :

il faut changer des parametres de Apache alors car chez moi, ca passe seulement en clair !




tu crytpe avec quoi ?
essayes  Ici!

Reply

Marsh Posté le 24-07-2002 à 13:42:38    

Marche pas non plus !

Reply

Marsh Posté le 24-07-2002 à 14:41:08    

zekill a écrit a écrit :

Marche pas non plus !




Tu peux me montrer tes .htacess & ton httpd.conf
(eventuellement tu me mails @ cequetuveux@littleboboy.net )
je regarderais ce soir car la j'ai pas le temps -_-

Reply

Marsh Posté le 24-07-2002 à 15:02:58    

littleboboy a écrit a écrit :

 
Tu peux me montrer tes .htacess & ton httpd.conf
(eventuellement tu me mails @ cequetuveux@littleboboy.net )
je regarderais ce soir car la j'ai pas le temps -_-
 




au fait tu te sers de htpasswd.exe pour faire les pass ( format MD5 en fait sous windows obligé )
il est dans /apache/bin

Reply

Marsh Posté le 24-07-2002 à 15:02:58   

Reply

Marsh Posté le 24-07-2002 à 15:07:30    

httpd.conf :

Code :
  1. [cpp]#
  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://www.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. # C:/Program Files/EasyPHP/apache/conf/srm.conf and then $path$/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 "C:/Program Files/EasyPHP/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, in addition to 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 dbm_auth_module modules/mod_auth_dbm.so
  168. #LoadModule digest_auth_module modules/mod_auth_digest.so
  169. #LoadModule digest_module modules/mod_digest.so
  170. #LoadModule proxy_module modules/mod_proxy.so
  171. #LoadModule cern_meta_module modules/mod_cern_meta.so
  172. #LoadModule expires_module modules/mod_expires.so
  173. #LoadModule headers_module modules/mod_headers.so
  174. #LoadModule usertrack_module modules/mod_usertrack.so
  175. #LoadModule unique_id_module modules/mod_unique_id.so
  176. #LoadModule gzip_module modules/ApacheModuleGzip.dll
  177. LoadModule anon_auth_module modules/mod_auth_anon.so
  178. LoadModule php4_module "C:/Program Files/EasyPHP/php/php4apache.dll"
  179. #
  180. #  Reconstruction of the complete module list from all available modules
  181. #  (static and shared ones) to achieve correct module execution order.
  182. #
  183. # The modules listed below, without a corresponding LoadModule directive,
  184. # are static bound into the standard Apache binary distribution for Windows.
  185. #
  186. # Note: The order in which modules are loaded is important.  Don't change
  187. # the order below without expert advice.
  188. #
  189. # [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE, UPDATE THIS TOO!]
  190. ClearModuleList
  191. #AddModule mod_vhost_alias.c
  192. AddModule mod_env.c
  193. AddModule mod_log_config.c
  194. #AddModule mod_mime_magic.c
  195. AddModule mod_mime.c
  196. AddModule mod_negotiation.c
  197. #AddModule mod_status.c
  198. #AddModule mod_info.c
  199. AddModule mod_include.c
  200. AddModule mod_autoindex.c
  201. AddModule mod_dir.c
  202. AddModule mod_isapi.c
  203. AddModule mod_cgi.c
  204. AddModule mod_asis.c
  205. AddModule mod_imap.c
  206. AddModule mod_actions.c
  207. #AddModule mod_speling.c
  208. AddModule mod_userdir.c
  209. AddModule mod_alias.c
  210. #AddModule mod_rewrite.c
  211. AddModule mod_access.c
  212. AddModule mod_auth.c
  213. #AddModule mod_auth_anon.c
  214. #AddModule mod_auth_dbm.c
  215. #AddModule mod_auth_digest.c
  216. #AddModule mod_digest.c
  217. #AddModule mod_proxy.c
  218. #AddModule mod_cern_meta.c
  219. #AddModule mod_expires.c
  220. #AddModule mod_headers.c
  221. #AddModule mod_usertrack.c
  222. #AddModule mod_unique_id.c
  223. AddModule mod_so.c
  224. AddModule mod_setenvif.c
  225. AddModule mod_auth_anon.c
  226. AddModule mod_php4.c
  227. #
  228. # ExtendedStatus controls whether Apache will generate "full" status
  229. # information (ExtendedStatus On) or just basic information (ExtendedStatus
  230. # Off) when the "server-status" handler is called. The default is Off.
  231. #
  232. #ExtendedStatus On
  233. ### Section 2: 'Main' server configuration
  234. #
  235. # The directives in this section set up the values used by the 'main'
  236. # server, which responds to any requests that aren't handled by a
  237. # <VirtualHost> definition.  These values also provide defaults for
  238. # any <VirtualHost> containers you may define later in the file.
  239. #
  240. # All of these directives may appear inside <VirtualHost> containers,
  241. # in which case these default settings will be overridden for the
  242. # virtual host being defined.
  243. #
  244. #
  245. # Port: The port to which the standalone server listens.  Certain firewall
  246. # products must be configured before Apache can listen to a specific port.
  247. # Other running httpd servers will also interfere with this port.  Disable
  248. # all firewall, security, and other services if you encounter problems.
  249. # To help diagnose problems use the Windows NT command NETSTAT -a
  250. #
  251. Port 80
  252. #
  253. # ServerAdmin: Your address, where problems with the server should be
  254. # e-mailed.  This address appears on some server-generated pages, such
  255. # as error documents.
  256. #
  257. ServerAdmin admin@localhost
  258. #
  259. # ServerName allows you to set a host name which is sent back to clients for
  260. # your server if it's different than the one the program would get (i.e., use
  261. # "www" instead of the host's real name).
  262. #
  263. # Note: You cannot just invent host names and hope they work. The name you
  264. # define here must be a valid DNS name for your host. If you don't understand
  265. # this, ask your network administrator.
  266. # If your host doesn't have a registered DNS name, enter its IP address here.
  267. # You will have to access it by its address (e.g., http://123.45.67.89/)
  268. # anyway, and this will make redirections work in a sensible way.
  269. #
  270. # 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your
  271. # machine always knows itself by this address. If you use Apache strictly for
  272. # local testing and development, you may use 127.0.0.1 as the server name.
  273. #
  274. ServerName localhost
  275. #
  276. # DocumentRoot: The directory out of which you will serve your
  277. # documents. By default, all requests are taken from this directory, but
  278. # symbolic links and aliases may be used to point to other locations.
  279. #
  280. DocumentRoot "C:/Program Files/EasyPHP/www"
  281. #
  282. # Each directory to which Apache has access, can be configured with respect
  283. # to which services and features are allowed and/or disabled in that
  284. # directory (and its subdirectories).
  285. #
  286. # First, we configure the "default" to be a very restrictive set of
  287. # permissions. 
  288. #
  289. <Directory />
  290.     Options FollowSymLinks Indexes
  291.     AllowOverride All
  292. </Directory>
  293. #
  294. # Note that from this point forward you must specifically allow
  295. # particular features to be enabled - so if something's not working as
  296. # you might expect, make sure that you have specifically enabled it
  297. # below.
  298. #
  299. #
  300. # This should be changed to whatever you set DocumentRoot to.
  301. #
  302. <Directory "C:/Program Files/EasyPHP/www">
  303. #
  304. # This may also be "None", "All", or any combination of "Indexes",
  305. # "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
  306. #
  307. # Note that "MultiViews" must be named *explicitly* --- "Options All"
  308. # doesn't give it to you.
  309. #
  310.     Options Indexes FollowSymLinks Includes
  311. #
  312. # This controls which options the .htaccess files in directories can
  313. # override. Can also be "All", or any combination of "Options", "FileInfo",
  314. # "AuthConfig", and "Limit"
  315. #
  316.     AllowOverride All
  317. #
  318. # Controls who can get stuff from this server.
  319. #
  320.     Order allow,deny
  321.     Allow from all
  322. </Directory>
  323. #
  324. # UserDir: The name of the directory which is appended onto a user's home
  325. # directory if a ~user request is received.
  326. #
  327. # Under Win32, we do not currently try to determine the home directory of
  328. # a Windows login, so a format such as that below needs to be used.  See
  329. # the UserDir documentation for details.
  330. #
  331. #<IfModule mod_userdir.c>
  332. #    UserDir "C:/Program Files/EasyPHP/apache/users/"
  333. #</IfModule>
  334. #
  335. # Control access to UserDir directories.  The following is an example
  336. # for a site where these directories are restricted to read-only.
  337. #
  338. #<Directory "C:/Program Files/EasyPHP/apache/users">
  339. #    AllowOverride FileInfo AuthConfig Limit
  340. #    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
  341. #    <Limit GET POST OPTIONS PROPFIND>
  342. #        Order allow,deny
  343. #        Allow from all
  344. #    </Limit>
  345. #    <LimitExcept GET POST OPTIONS PROPFIND>
  346. #        Order deny,allow
  347. #        Deny from all
  348. #    </LimitExcept>
  349. #</Directory>
  350. #
  351. # DirectoryIndex: Name of the file or files to use as a pre-written HTML
  352. # directory index.  Separate multiple entries with spaces.
  353. #
  354. <IfModule mod_dir.c>
  355.     DirectoryIndex index.html index.shtml index.wml index.pwml index.php index.php3 index.php4
  356. </IfModule>
  357. #
  358. # AccessFileName: The name of the file to look for in each directory
  359. # for access control information.
  360. #
  361. AccessFileName .htaccess
  362. #
  363. # The following lines prevent .htaccess files from being viewed by
  364. # Web clients.  Since .htaccess files often contain authorization
  365. # information, access is disallowed for security reasons.  Comment
  366. # these lines out if you want Web visitors to see the contents of
  367. # .htaccess files.  If you change the AccessFileName directive above,
  368. # be sure to make the corresponding changes here.
  369. #
  370. # Also, folks tend to use names such as .htpasswd for password
  371. # files, so this will protect those as well.
  372. #
  373. <Files ~ "^\.ht">
  374.     Order allow,deny
  375.     Deny from all
  376.     Satisfy All
  377. </Files>
  378. #
  379. # CacheNegotiatedDocs: By default, Apache sends "Pragma: no-cache" with each
  380. # document that was negotiated on the basis of content. This asks proxy
  381. # servers not to cache the document. Uncommenting the following line disables
  382. # this behavior, and proxies will be allowed to cache the documents.
  383. #
  384. #CacheNegotiatedDocs
  385. #
  386. # UseCanonicalName:  (new for 1.3)  With this setting turned on, whenever
  387. # Apache needs to construct a self-referencing URL (a URL that refers back
  388. # to the server the response is coming from) it will use ServerName and
  389. # Port to form a "canonical" name.  With this setting off, Apache will
  390. # use the hostname:port that the client supplied, when possible.  This
  391. # also affects SERVER_NAME and SERVER_PORT in CGI scripts.
  392. #
  393. UseCanonicalName On
  394. #
  395. # TypesConfig describes where the mime.types file (or equivalent) is
  396. # to be found.
  397. #
  398. <IfModule mod_mime.c>
  399.     TypesConfig conf/mime.types
  400. </IfModule>
  401. #
  402. # DefaultType is the default MIME type the server will use for a document
  403. # if it cannot otherwise determine one, such as from filename extensions.
  404. # If your server contains mostly text or HTML documents, "text/plain" is
  405. # a good value.  If most of your content is binary, such as applications
  406. # or images, you may want to use "application/octet-stream" instead to
  407. # keep browsers from trying to display binary files as though they are
  408. # text.
  409. #
  410. DefaultType text/plain
  411. #
  412. # The mod_mime_magic module allows the server to use various hints from the
  413. # contents of the file itself to determine its type.  The MIMEMagicFile
  414. # directive tells the module where the hint definitions are located.
  415. # mod_mime_magic is not part of the default server (you have to add
  416. # it yourself with a LoadModule [see the DSO paragraph in the 'Global
  417. # Environment' section], or recompile the server and include mod_mime_magic
  418. # as part of the configuration), so it's enclosed in an <IfModule> container.
  419. # This means that the MIMEMagicFile directive will only be processed if the
  420. # module is part of the server.
  421. #
  422. <IfModule mod_mime_magic.c>
  423.     MIMEMagicFile conf/magic
  424. </IfModule>
  425. #
  426. # HostnameLookups: Log the names of clients or just their IP addresses
  427. # e.g., www.apache.org (on) or 204.62.129.132 (off).
  428. # The default is off because it'd be overall better for the net if people
  429. # had to knowingly turn this feature on, since enabling it means that
  430. # each client request will result in AT LEAST one lookup request to the
  431. # nameserver.
  432. #
  433. HostnameLookups Off
  434. #
  435. # ErrorLog: The location of the error log file.
  436. # If you do not specify an ErrorLog directive within a <VirtualHost>
  437. # container, error messages relating to that virtual host will be
  438. # logged here.  If you *do* define an error logfile for a <VirtualHost>
  439. # container, that host's errors will be logged there and not here.
  440. #
  441. ErrorLog logs/error.log
  442. #
  443. # LogLevel: Control the number of messages logged to the error.log.
  444. # Possible values include: debug, info, notice, warn, error, crit,
  445. # alert, emerg.
  446. #
  447. LogLevel warn
  448. #
  449. # The following directives define some format nicknames for use with
  450. # a CustomLog directive (see below).
  451. #
  452. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  453. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  454. LogFormat "%{Referer}i -> %U" referer
  455. LogFormat "%{User-agent}i" agent
  456. #
  457. # The location and format of the access logfile (Common Logfile Format).
  458. # If you do not define any access logfiles within a <VirtualHost>
  459. # container, they will be logged here.  Contrariwise, if you *do*
  460. # define per-<VirtualHost> access logfiles, transactions will be
  461. # logged therein and *not* in this file.
  462. #
  463. CustomLog logs/access.log common
  464. #
  465. # If you would like to have agent and referer logfiles, uncomment the
  466. # following directives.
  467. #
  468. #CustomLog logs/referer.log referer
  469. #CustomLog logs/agent.log agent
  470. #
  471. # If you prefer a single logfile with access, agent, and referer information
  472. # (Combined Logfile Format) you can use the following directive.
  473. #
  474. #CustomLog logs/access.log combined
  475. #
  476. # Optionally add a line containing the server version and virtual host
  477. # name to server-generated pages (error documents, FTP directory listings,
  478. # mod_status and mod_info output etc., but not CGI generated documents).
  479. # Set to "EMail" to also include a mailto: link to the ServerAdmin.
  480. # Set to one of:  On | Off | EMail
  481. #
  482. ServerSignature EMail
  483. #
  484. # Apache parses all CGI scripts for the shebang line by default.
  485. # This comment line, the first line of the script, consists of the symbols
  486. # pound (#) and exclamation (!) followed by the path of the program that
  487. # can execute this specific script.  For a perl script, with perl.exe in
  488. # the C:\Program Files\Perl directory, the shebang line should be:
  489.    #!c:/program files/perl/perl
  490. # Note you _must_not_ indent the actual shebang line, and it must be the
  491. # first line of the file.  Of course, CGI processing must be enabled by
  492. # the appropriate ScriptAlias or Options ExecCGI directives for the files
  493. # or directory in question.
  494. #
  495. # However, Apache on Windows allows either the Unix behavior above, or can
  496. # use the Registry to match files by extention.  The command to execute
  497. # a file of this type is retrieved from the registry by the same method as
  498. # the Windows Explorer would use to handle double-clicking on a file.
  499. # These script actions can be configured from the Windows Explorer View menu,
  500. # 'Folder Options', and reviewing the 'File Types' tab.  Clicking the Edit
  501. # button allows you to modify the Actions, of which Apache 1.3 attempts to
  502. # perform the 'Open' Action, and failing that it will try the shebang line.
  503. # This behavior is subject to change in Apache release 2.0.
  504. #
  505. # Each mechanism has it's own specific security weaknesses, from the means
  506. # to run a program you didn't intend the website owner to invoke, and the
  507. # best method is a matter of great debate.
  508. #
  509. # To enable the this Windows specific behavior (and therefore -disable- the
  510. # equivilant Unix behavior), uncomment the following directive:
  511. #
  512. #ScriptInterpreterSource registry
  513. #
  514. # The directive above can be placed in individual <Directory> blocks or the
  515. # .htaccess file, with either the 'registry' (Windows behavior) or 'script'
  516. # (Unix behavior) option, and will override this server default option.
  517. #
  518. #
  519. # Redirect allows you to tell clients about documents which used to exist in
  520. # your server's namespace, but do not anymore. This allows you to tell the
  521. # clients where to look for the relocated document.
  522. # Format: Redirect old-URI new-URL
  523. #
  524. #
  525. # Directives controlling the display of server-generated directory listings.
  526. #
  527. <IfModule mod_autoindex.c>
  528.     #
  529.     # FancyIndexing is whether you want fancy directory indexing or standard
  530.     #
  531.     # Note, add the option TrackModified to the IndexOptions default list only
  532.     # if all indexed directories reside on NTFS volumes.  The TrackModified flag
  533.     # will report the Last-Modified date to assist caches and proxies to properly
  534.     # track directory changes, but it does _not_ work on FAT volumes.
  535.     #
  536.     IndexOptions FancyIndexing
  537.     #
  538.     # AddIcon* directives tell the server which icon to show for different
  539.     # files or filename extensions.  These are only displayed for
  540.     # FancyIndexed directories.
  541.     #
  542.     AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
  543.     AddIconByType (TXT,/icons/text.gif) text/*
  544.     AddIconByType (IMG,/icons/image2.gif) image/*
  545.     AddIconByType (SND,/icons/sound2.gif) audio/*
  546.     AddIconByType (VID,/icons/movie.gif) video/*
  547.     AddIcon /icons/binary.gif .bin .exe
  548.     AddIcon /icons/binhex.gif .hqx
  549.     AddIcon /icons/tar.gif .tar
  550.     AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
  551.     AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
  552.     AddIcon /icons/a.gif .ps .ai .eps
  553.     AddIcon /icons/layout.gif .html .shtml .htm .pdf
  554.     AddIcon /icons/text.gif .txt
  555.     AddIcon /icons/c.gif .c
  556.     AddIcon /icons/p.gif .pl .py
  557.     AddIcon /icons/f.gif .for
  558.     AddIcon /icons/dvi.gif .dvi
  559.     AddIcon /icons/uuencoded.gif .uu
  560.     AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
  561.     AddIcon /icons/tex.gif .tex
  562.     AddIcon /icons/bomb.gif core
  563.     AddIcon /icons/back.gif ..
  564.     AddIcon /icons/hand.right.gif README
  565.     AddIcon /icons/folder.gif ^^DIRECTORY^^
  566.     AddIcon /icons/blank.gif ^^BLANKICON^^
  567.     #
  568.     # DefaultIcon is which icon to show for files which do not have an icon
  569.     # explicitly set.
  570.     #
  571.     DefaultIcon /icons/unknown.gif
  572.     #
  573.     # AddDescription allows you to place a short description after a file in
  574.     # server-generated indexes.  These are only displayed for FancyIndexed
  575.     # directories.
  576.     # Format: AddDescription "description" filename
  577.     #
  578.     AddDescription "GZIP compressed document" .gz
  579.     AddDescription "tar archive" .tar
  580.     AddDescription "GZIP compressed tar archive" .tgz
  581.     AddDescription "ZIP archive" .zip
  582.     AddDescription "CAB archive" .cab
  583.     AddDescription "Win32 Executable" .exe
  584.     #
  585.     # ReadmeName is the name of the README file the server will look for by
  586.     # default, and append to directory listings.
  587.     #
  588.     # HeaderName is the name of a file which should be prepended to
  589.     # directory indexes.  
  590.     #
  591.     # If MultiViews are amongst the Options in effect, the server will
  592.     # first look for name.html and include it if found.  If name.html
  593.     # doesn't exist, the server will then look for name.txt and include
  594.     # it as plaintext if found.
  595.     #
  596.     ReadmeName README
  597.     HeaderName HEADER
  598.     #
  599.     # IndexIgnore is a set of filenames which directory indexing should ignore
  600.     # and not include in the listing.  Shell-style wildcarding is permitted.
  601.     #
  602.     IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
  603. </IfModule>
  604. # End of indexing directives.
  605. #
  606. # Document types.
  607. #
  608. <IfModule mod_mime.c>
  609.     #
  610.     # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
  611.     # information on the fly. Note: Not all browsers support this.
  612.     # Despite the name similarity, the following Add* directives have nothing
  613.     # to do with the FancyIndexing customization directives above.
  614.     #
  615.     AddEncoding x-compress Z
  616.     AddEncoding x-gzip gz tgz
  617.     #
  618.     # AddLanguage allows you to specify the language of a document. You can
  619.     # then use content negotiation to give a browser a file in a language
  620.     # it can understand.
  621.     #
  622.     # Note 1: The suffix does not have to be the same as the language
  623.     # keyword --- those with documents in Polish (whose net-standard
  624.     # language code is pl) may wish to use "AddLanguage pl .po" to
  625.     # avoid the ambiguity with the common suffix for perl scripts.
  626.     #
  627.     # Note 2: The example entries below illustrate that in quite
  628.     # some cases the two character 'Language' abbreviation is not
  629.     # identical to the two character 'Country' code for its country,
  630.     # E.g. 'Danmark/dk' versus 'Danish/da'.
  631.     #
  632.     # Note 3: In the case of 'ltz' we violate the RFC by using a three char
  633.     # specifier. But there is 'work in progress' to fix this and get
  634.     # the reference data for rfc1766 cleaned up.
  635.     #
  636.     # Danish (da) - Dutch (nl) - English (en) - Estonian (ee)
  637.     # French (fr) - German (de) - Greek-Modern (el)
  638.     # Italian (it) - Korean (kr) - Norwegian (no) - Norwegian Nynorsk (nn)
  639.     # Portugese (pt) - Luxembourgeois* (ltz)
  640.     # Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cz)
  641.     # Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)
  642.     # Russian (ru)
  643.     #
  644.     AddLanguage da .dk
  645.     AddLanguage nl .nl
  646.     AddLanguage en .en
  647.     AddLanguage et .ee
  648.     AddLanguage fr .fr
  649.     AddLanguage de .de
  650.     AddLanguage el .el
  651.     AddLanguage he .he
  652.     AddCharset ISO-8859-8 .iso8859-8
  653.     AddLanguage it .it
  654.     AddLanguage ja .ja
  655.     AddCharset ISO-2022-JP .jis
  656.     AddLanguage kr .kr
  657.     AddCharset ISO-2022-KR .iso-kr
  658.     AddLanguage nn .nn
  659.     AddLanguage no .no
  660.     AddLanguage pl .po
  661.     AddCharset ISO-8859-2 .iso-pl
  662.     AddLanguage pt .pt
  663.     AddLanguage pt-br .pt-br
  664.     AddLanguage ltz .lu
  665.     AddLanguage ca .ca
  666.     AddLanguage es .es
  667.     AddLanguage sv .sv
  668.     AddLanguage cz .cz
  669.     AddLanguage ru .ru
  670.     AddLanguage tw .tw
  671.     AddLanguage zh-tw .tw
  672.     AddCharset Big5         .Big5    .big5
  673.     AddCharset WINDOWS-1251 .cp-1251
  674.     AddCharset CP866        .cp866
  675.     AddCharset ISO-8859-5   .iso-ru
  676.     AddCharset KOI8-R       .koi8-r
  677.     AddCharset UCS-2        .ucs2
  678.     AddCharset UCS-4        .ucs4
  679.     AddCharset UTF-8        .utf8
  680.     # LanguagePriority allows you to give precedence to some languages
  681.     # in case of a tie during content negotiation.
  682.     #
  683.     # Just list the languages in decreasing order of preference. We have
  684.     # more or less alphabetized them here. You probably want to change this.
  685.     #
  686.     <IfModule mod_negotiation.c>
  687.         LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
  688.     </IfModule>
  689.     #
  690.     # AddType allows you to tweak mime.types without actually editing it, or to
  691.     # make certain files to be certain types.
  692.     #
  693.     AddType application/x-tar .tgz
  694.     AddType application/vnd.wap.wmlc .wmlc
  695.     AddType application/x-httpd-php .phtml .pwml .php3 .php4 .php .php2 .inc
  696.     AddType text/vnd.wap.wml .wml
  697.     AddType text/vnd.wap.wmlscript .wmls
  698.     AddType text/vnd.wap.wmlscriptc .wmlsc
  699.     AddType image/vnd.wap.wbmp .wbmp
  700.     #
  701.     # AddHandler allows you to map certain file extensions to "handlers",
  702.     # actions unrelated to filetype. These can be either built into the server
  703.     # or added with the Action command (see below)
  704.     #
  705.     # If you want to use server side includes, or CGI outside
  706.     # ScriptAliased directories, uncomment the following lines.
  707.     #
  708.     # To use CGI scripts:
  709.     #
  710.     AddHandler cgi-script .cgi
  711.     #
  712.     # To use server-parsed HTML files
  713.     #
  714.     AddType text/html .shtml
  715.     AddHandler server-parsed .shtml
  716.     #
  717.     # Uncomment the following line to enable Apache's send-asis HTTP file
  718.     # feature
  719.     #
  720.     #AddHandler send-as-is asis
  721.     #
  722.     # If you wish to use server-parsed imagemap files, use
  723.     #
  724.     #AddHandler imap-file map
  725.     #
  726.     # To enable type maps, you might want to use
  727.     #
  728.     #AddHandler type-map var
  729. </IfModule>
  730. # End of document types.
  731. #
  732. # Action lets you define media types that will execute a script whenever
  733. # a matching file is called. This eliminates the need for repeated URL
  734. # pathnames for oft-used CGI file processors.
  735. # Format: Action media/type /cgi-script/location
  736. # Format: Action handler-name /cgi-script/location
  737. #
  738. #
  739. # MetaDir: specifies the name of the directory in which Apache can find
  740. # meta information files. These files contain additional HTTP headers
  741. # to include when sending the document
  742. #
  743. #MetaDir .web
  744. #
  745. # MetaSuffix: specifies the file name suffix for the file containing the
  746. # meta information.
  747. #
  748. #MetaSuffix .meta
  749. #
  750. # Customizable error response (Apache style)
  751. #  these come in three flavors
  752. #
  753. #    1) plain text
  754. #ErrorDocument 500 "The server made a boo boo.
  755. #  n.b.  the single leading (" ) marks it as text, it does not get output
  756. #
  757. #    2) local redirects
  758. #ErrorDocument 404 /missing.html
  759. #  to redirect to local URL /missing.html
  760. #ErrorDocument 404 /cgi-bin/missing_handler.pl
  761. #  N.B.: You can redirect to a script or a document using server-side-includes.
  762. #
  763. #    3) external redirects
  764. #ErrorDocument 402 http://some.other-server.com/subscription_info.html
  765. #  N.B.: Many of the environment variables associated with the original
  766. #  request will *not* be available to such a script.
  767. #
  768. # Customize behaviour based on the browser
  769. #
  770. <IfModule mod_setenvif.c>
  771.     #
  772.     # The following directives modify normal HTTP response behavior.
  773.     # The first directive disables keepalive for Netscape 2.x and browsers that
  774.     # spoof it. There are known problems with these browser implementations.
  775.     # The second directive is for Microsoft Internet Explorer 4.0b2
  776.     # which has a broken HTTP/1.1 implementation and does not properly
  777.     # support keepalive when it is used on 301 or 302 (redirect) responses.
  778.     #
  779.     BrowserMatch "Mozilla/2" nokeepalive
  780.     BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
  781.     #
  782.     # The following directive disables HTTP/1.1 responses to browsers which
  783.     # are in violation of the HTTP/1.0 spec by not being able to grok a
  784.     # basic 1.1 response.
  785.     #
  786.     BrowserMatch "RealPlayer 4\.0" force-response-1.0
  787.     BrowserMatch "Java/1\.0" force-response-1.0
  788.     BrowserMatch "JDK/1\.0" force-response-1.0
  789. </IfModule>
  790. # End of browser customization directives
  791. #
  792. # Allow server status reports, with the URL of http://servername/server-status
  793. # Change the "supaero.fr" to match your domain to enable.
  794. #
  795. #<Location /server-status>
  796. #    SetHandler server-status
  797. #    Order deny,allow
  798. #    Deny from all
  799. #    Allow from supaero.fr
  800. #</Location>
  801. #
  802. # Allow remote server configuration reports, with the URL of
  803. # http://servername/server-info (requires that mod_info.c be loaded).
  804. # Change the "supaero.fr" to match your domain to enable.
  805. #
  806. #<Location /server-info>
  807. #    SetHandler server-info
  808. #    Order deny,allow
  809. #    Deny from all
  810. #    Allow from supaero.fr
  811. #</Location>
  812. #
  813. # There have been reports of people trying to abuse an old bug from pre-1.1
  814. # days.  This bug involved a CGI script distributed as a part of Apache.
  815. # By uncommenting these lines you can redirect these attacks to a logging  
  816. # script on phf.apache.org.  Or, you can record them yourself, using the script
  817. # support/phf_abuse_log.cgi.
  818. #
  819. #<Location /cgi-bin/phf*>
  820. #    Deny from all
  821. #    ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi
  822. #</Location>
  823. #
  824. # Proxy Server directives. Uncomment the following lines to
  825. # enable the proxy server:
  826. #
  827. #<IfModule mod_proxy.c>
  828. #    ProxyRequests On
  829. #    <Directory proxy:*>
  830. #        Order deny,allow
  831. #        Deny from all
  832. #        Allow from supaero.fr
  833. #    </Directory>
  834.     #
  835.     # Enable/disable the handling of HTTP/1.1 "Via:" headers.
  836.     # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
  837.     # Set to one of: Off | On | Full | Block
  838.     #
  839. #    ProxyVia On
  840.     #
  841.     # To enable the cache as well, edit and uncomment the following lines:
  842.     # (no cacheing without CacheRoot)
  843.     #
  844. #    CacheRoot "C:/Program Files/EasyPHP/apache/proxy"
  845. #    CacheSize 5
  846. #    CacheGcInterval 4
  847. #    CacheMaxExpire 24
  848. #    CacheLastModifiedFactor 0.1
  849. #    CacheDefaultExpire 1
  850. #    NoCache a-domain.com another-domain.edu joes.garage-sale.com
  851. #</IfModule>
  852. # End of proxy directives.
  853. ### Section 3: Virtual Hosts
  854. #
  855. # VirtualHost: If you want to maintain multiple domains/hostnames on your
  856. # machine you can setup VirtualHost containers for them. Most configurations
  857. # use only name-based virtual hosts so the server doesn't need to worry about
  858. # IP addresses. This is indicated by the asterisks in the directives below.
  859. #
  860. # Please see the documentation at <URL:http://www.apache.org/docs/vhosts/>
  861. # for further details before you try to setup virtual hosts.
  862. #
  863. # You may use the command line option '-S' to verify your virtual host
  864. # configuration.
  865. #
  866. # Use name-based virtual hosting.
  867. #
  868. #NameVirtualHost *
  869. #
  870. # VirtualHost example:
  871. # Almost any Apache directive may go into a VirtualHost container.
  872. # The first VirtualHost section is used for requests without a known
  873. # server name.
  874. #
  875. #<VirtualHost *>
  876. #    ServerAdmin webmaster@dummy-host.example.com
  877. #    DocumentRoot /www/docs/dummy-host.example.com
  878. #    ServerName dummy-host.example.com
  879. #    ErrorLog logs/dummy-host.example.com-error_log
  880. #    CustomLog logs/dummy-host.example.com-access_log common
  881. #</VirtualHost>
  882. #
  883. # Aliases: Add here as many aliases as you need (with no limit). The format is  
  884. # Alias fakename realname
  885. #
  886. <IfModule mod_alias.c>
  887.     #
  888.     # Note that if you include a trailing / on fakename then the server will
  889.     # require it to be present in the URL.  So "/icons" isn't aliased in this
  890.     # example, only "/icons/".  If the fakename is slash-terminated, then the  
  891.     # realname must also be slash terminated, and if the fakename omits the  
  892.     # trailing slash, the realname must also omit it.
  893.     #
  894.     Alias /icons/ "C:/Program Files/EasyPHP/apache/icons/"
  895.     <Directory "C:/Program Files/EasyPHP/apache/icons">
  896.         Options Indexes MultiViews
  897.         AllowOverride None
  898.         Order allow,deny
  899.         Allow from all
  900.     </Directory>
  901.     Alias /images_easyphp/ "C:/Program Files/EasyPHP/home/images_easyphp/"
  902.     <Directory "C:/Program Files/EasyPHP/home/images_easyphp">
  903.         Options Indexes MultiViews
  904.         AllowOverride None
  905.         Order allow,deny
  906.         Allow from all
  907.     </Directory>
  908.     Alias /mysql/ "C:/Program Files/EasyPHP/phpmyadmin/"
  909.     <Directory "C:/Program Files/EasyPHP/phpmyadmin">
  910.         Options FollowSymLinks Indexes
  911.         AllowOverride None
  912.         Order deny,allow
  913.         allow from 127.0.0.1
  914.         deny from all
  915.     </Directory>
  916.     Alias /home/ "C:/Program Files/EasyPHP/home/"
  917.     <Directory "C:/Program Files/EasyPHP/phpmyadmin">
  918.         Options FollowSymLinks Indexes
  919.         AllowOverride None
  920.         Order deny,allow
  921.         allow from 127.0.0.1
  922.         deny from all
  923.     </Directory>
  924.     # This Alias will project the on-line documentation tree under /manual/
  925.     # even if you change the DocumentRoot. Comment it if you don't want to  
  926.     # provide access to the on-line documentation.
  927.     #
  928.     #Alias /manual/ "C:/Program Files/EasyPHP/apache/htdocs/manual/"
  929.     #<Directory "C:/Program Files/EasyPHP/apache/htdocs/manual">
  930.     #    Options Indexes FollowSymlinks MultiViews
  931.     #    AllowOverride None
  932.     #    Order allow,deny
  933.     #    Allow from all
  934.     #</Directory>
  935.     #
  936.     # ScriptAlias: This controls which directories contain server scripts.
  937.     # ScriptAliases are essentially the same as Aliases, except that
  938.     # documents in the realname directory are treated as applications and
  939.     # run by the server when requested rather than as documents sent to the client.
  940.     # The same rules about trailing "/" apply to ScriptAlias directives as to
  941.     # Alias.
  942.     #
  943.     ScriptAlias /cgi-bin/ "C:/Program Files/EasyPHP/cgi-bin/"
  944.     #
  945.     # "C:/Program Files/EasyPHP/apache/cgi-bin" should be changed to whatever your ScriptAliased
  946.     # CGI directory exists, if you have that configured.
  947.     #
  948.     <Directory "C:/Program Files/EasyPHP/cgi-bin">
  949.         AllowOverride None
  950.         Options None
  951.         Order allow,deny
  952.         Allow from all
  953.     </Directory>
  954. #alias
  955. #alias
  956. </IfModule>
  957. # End of aliases.


et .htaccess[/cpp]

Code :
  1. AuthUserFile "c:\program files\easyphp\www\.htpasswd"
  2. AuthName "Accès protégé"
  3. AuthType Basic
  4. <limit GET POST>
  5. require valid-user 
  6. </limit>


Je rappele que ca fonctionne mais sans crypter !  ;)

Reply

Marsh Posté le 24-07-2002 à 15:11:00    

Pour crypter tu as mis les pass ( suis con j'ai pas besoin de  ton httpd.conf :D ) en utilisant htpasswd ?
 

Usage:
        htpasswd [-cmdps] passwordfile username
        htpasswd -b[cmdps] passwordfile username password
 
        htpasswd -n[mdps] username
        htpasswd -nb[mdps] username password
 -c  Create a new file.
 -n  Don't update file; display results on stdout.
 -m  Force MD5 encryption of the password (default).
 -d  Force CRYPT encryption of the password.
 -p  Do not encrypt the password (plaintext).
 -s  Force SHA encryption of the password.
 -b  Use the password from the command line rather than prompting for it.
On Windows, TPF and NetWare systems the '-m' flag is used by default.
On all other systems, the '-p' flag will probably not work.


Donc pour disons creer un fichier .htpasswd avec comme login toto
tu fais sous dos
htpasswd -c .htpasswd toto  
& apres il te demande les pass & login
Si tu as déja  ton fichier .htpassws le flag -c n'est pas necessaire :D

Reply

Sujets relatifs:

Leave a Replay

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