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

  FORUM HardWare.fr
  Linux et OS Alternatifs
  réseaux et sécurité

  Accès serveur apache par ip externe impossible ?

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Accès serveur apache par ip externe impossible ?

n°996490
jamesbond2
Posté le 31-12-2007 à 11:38:28  profilanswer
 

salut,
 
J'ai un gros souci avec la mise en place d'un serveur http local apache.  
 
Je suis sur Linux Fedora 8 avec apache 2. Mon FAI est free.
 
Les accès à mon site par des ip autres que l'ip local de la machine du serveur apache échouent.
 
J'accède bien à mon RocumentRoot par le réseaux local genre 192.168.0.2 (machine serveur), mais pas par l'ip externe de ma freebox 82.XXX.XXX.XXX
 
Il me met l'erreur suivante si je charge http://82.XXX.XXX.XXX
 

Code :
  1. FORBIDDEN
  2. You don't have permission to access this file on this server.
  3. Cheyenne/2.0.36 Server at localhost Port 80


 
Ce qui me surprend c'est que si je charge la même ip avec un nom de fichier de mon site (Ex : http://82.XXX.XXX.XXX/essai.txt), il me met
 

Code :
  1. NOT FOUND
  2. The request url was not found on this server
  3. Cheyenne/2.0.36 Server at localhost Port 80


 
A noter qu'il ne me met aucune erreur si je charge http://192.168.0.2/essai.txt
 
Cela veut donc dire que je n'abouti pas au même répertoire de mon disque selon que je charge l'ip externe ou l'ip interne ????!!!!
 
Je ne comprends pas trop pourquoi !
 
Pour les testes, tous les répertoires de / jusqu'à DocumentRoot sont en droit 755 et les fichiers de mon site en droit 777
 
Voici ma configuration sur ma freebox qui est en mode routeur NAT:
 
ip freebox : 192.168.0.254
début DHCP : 192.168.0.1
fin DHCP : 192.168.0.50
 
ip DMZ : rien
ip freeplayer : rien
 
Réponse ping : désactiver
proxy WOL : désactiver
 
Redirection ports :  
 
8080 tcp 192.168.0.2 8080
6220 tcp 192.168.0.1 6220
5852 udp 192.168.0.1 5852
8080 udp 192.168.0.2 8080
 
Apparemment la redirection doit se faire sur le port 8080 car linux fedora inclus un firewall par défaut. Le port pour traverser ce firewall est apparemment 8080.
 
Ai-je oubvlié quelque chose, pourquoi je ne peux pas y accéder la un ip externe ?

mood
Publicité
Posté le 31-12-2007 à 11:38:28  profilanswer
 

n°996517
zecrazytux
Posté le 31-12-2007 à 14:00:14  profilanswer
 

je ne connais pas les regles de filtrage de fedora mais c'est bien étrange ce que tu raconte !
 
déja balance ton fichier de conf apache. tu dois avoir des virtualhosts qui te font aboutir sur des dossiers différents selon que tu y accede en local ou depuis ton ip publique.
 
et que donne "iptable -L" ?
quels sont les droits unix sur les DocumentRoot ?


---------------
Blog photo/récits activités en montagne http://planetcaravan.net
n°996526
jamesbond2
Posté le 31-12-2007 à 14:33:44  profilanswer
 

voici mon httpd.conf :  
 

Code :
  1. #
  2. # This is the main Apache server configuration file.  It contains the
  3. # configuration directives that give the server its instructions.
  4. # See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.
  5. # In particular, see
  6. # <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
  7. # for a discussion of each configuration directive.
  8. #
  9. #
  10. # Do NOT simply read the instructions in here without understanding
  11. # what they do.  They're here only as hints or reminders.  If you are unsure
  12. # consult the online docs. You have been warned. 
  13. #
  14. # The configuration directives are grouped into three basic sections:
  15. #  1. Directives that control the operation of the Apache server process as a
  16. #     whole (the 'global environment').
  17. #  2. Directives that define the parameters of the 'main' or 'default' server,
  18. #     which responds to requests that aren't handled by a virtual host.
  19. #     These directives also provide default values for the settings
  20. #     of all virtual hosts.
  21. #  3. Settings for virtual hosts, which allow Web requests to be sent to
  22. #     different IP addresses or hostnames and have them handled by the
  23. #     same Apache server process.
  24. #
  25. # Configuration and logfile names: If the filenames you specify for many
  26. # of the server's control files begin with "/" (or "drive:/" for Win32), the
  27. # server will use that explicit path.  If the filenames do *not* begin
  28. # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
  29. # with ServerRoot set to "/etc/httpd" will be interpreted by the
  30. # server as "/etc/httpd/logs/foo.log".
  31. #
  32. ### Section 1: Global Environment
  33. #
  34. # The directives in this section affect the overall operation of Apache,
  35. # such as the number of concurrent requests it can handle or where it
  36. # can find its configuration files.
  37. #
  38. #
  39. # Don't give away too much information about all the subcomponents
  40. # we are running.  Comment out this line if you don't mind remote sites
  41. # finding out what major optional modules you are running
  42. ServerTokens OS
  43. #
  44. # ServerRoot: The top of the directory tree under which the server's
  45. # configuration, error, and log files are kept.
  46. #
  47. # NOTE!  If you intend to place this on an NFS (or otherwise network)
  48. # mounted filesystem then please read the LockFile documentation
  49. # (available at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile> );
  50. # you will save yourself a lot of trouble.
  51. #
  52. # Do NOT add a slash at the end of the directory path.
  53. #
  54. ServerRoot "/etc/httpd"
  55. #
  56. # PidFile: The file in which the server should record its process
  57. # identification number when it starts.
  58. #
  59. PidFile run/httpd.pid
  60. #
  61. # Timeout: The number of seconds before receives and sends time out.
  62. #
  63. Timeout 120
  64. #
  65. # KeepAlive: Whether or not to allow persistent connections (more than
  66. # one request per connection). Set to "Off" to deactivate.
  67. #
  68. KeepAlive Off
  69. #
  70. # MaxKeepAliveRequests: The maximum number of requests to allow
  71. # during a persistent connection. Set to 0 to allow an unlimited amount.
  72. # We recommend you leave this number high, for maximum performance.
  73. #
  74. MaxKeepAliveRequests 100
  75. #
  76. # KeepAliveTimeout: Number of seconds to wait for the next request from the
  77. # same client on the same connection.
  78. #
  79. KeepAliveTimeout 15
  80. ##
  81. ## Server-Pool Size Regulation (MPM specific)
  82. ##
  83. # prefork MPM
  84. # StartServers: number of server processes to start
  85. # MinSpareServers: minimum number of server processes which are kept spare
  86. # MaxSpareServers: maximum number of server processes which are kept spare
  87. # ServerLimit: maximum value for MaxClients for the lifetime of the server
  88. # MaxClients: maximum number of server processes allowed to start
  89. # MaxRequestsPerChild: maximum number of requests a server process serves
  90. <IfModule prefork.c>
  91. StartServers       8
  92. MinSpareServers    5
  93. MaxSpareServers   20
  94. ServerLimit      256
  95. MaxClients       256
  96. MaxRequestsPerChild  4000
  97. </IfModule>
  98. # worker MPM
  99. # StartServers: initial number of server processes to start
  100. # MaxClients: maximum number of simultaneous client connections
  101. # MinSpareThreads: minimum number of worker threads which are kept spare
  102. # MaxSpareThreads: maximum number of worker threads which are kept spare
  103. # ThreadsPerChild: constant number of worker threads in each server process
  104. # MaxRequestsPerChild: maximum number of requests a server process serves
  105. <IfModule worker.c>
  106. StartServers         2
  107. MaxClients         150
  108. MinSpareThreads     25
  109. MaxSpareThreads     75
  110. ThreadsPerChild     25
  111. MaxRequestsPerChild  0
  112. </IfModule>
  113. #
  114. # Listen: Allows you to bind Apache to specific IP addresses and/or
  115. # ports, in addition to the default. See also the <VirtualHost>
  116. # directive.
  117. #
  118. # Change this to Listen on specific IP addresses as shown below to
  119. # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
  120. #
  121. #Listen 12.34.56.78:80
  122. Listen 80
  123. #
  124. # Dynamic Shared Object (DSO) Support
  125. #
  126. # To be able to use the functionality of a module which was built as a DSO you
  127. # have to place corresponding `LoadModule' lines at this location so the
  128. # directives contained in it are actually available _before_ they are used.
  129. # Statically compiled modules (those listed by `httpd -l') do not need
  130. # to be loaded here.
  131. #
  132. # Example:
  133. # LoadModule foo_module modules/mod_foo.so
  134. #
  135. LoadModule auth_basic_module modules/mod_auth_basic.so
  136. LoadModule auth_digest_module modules/mod_auth_digest.so
  137. LoadModule authn_file_module modules/mod_authn_file.so
  138. LoadModule authn_alias_module modules/mod_authn_alias.so
  139. LoadModule authn_anon_module modules/mod_authn_anon.so
  140. LoadModule authn_dbm_module modules/mod_authn_dbm.so
  141. LoadModule authn_default_module modules/mod_authn_default.so
  142. LoadModule authz_host_module modules/mod_authz_host.so
  143. LoadModule authz_user_module modules/mod_authz_user.so
  144. LoadModule authz_owner_module modules/mod_authz_owner.so
  145. LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
  146. LoadModule authz_dbm_module modules/mod_authz_dbm.so
  147. LoadModule authz_default_module modules/mod_authz_default.so
  148. LoadModule ldap_module modules/mod_ldap.so
  149. LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
  150. LoadModule include_module modules/mod_include.so
  151. LoadModule log_config_module modules/mod_log_config.so
  152. LoadModule logio_module modules/mod_logio.so
  153. LoadModule env_module modules/mod_env.so
  154. LoadModule ext_filter_module modules/mod_ext_filter.so
  155. LoadModule mime_magic_module modules/mod_mime_magic.so
  156. LoadModule expires_module modules/mod_expires.so
  157. LoadModule deflate_module modules/mod_deflate.so
  158. LoadModule headers_module modules/mod_headers.so
  159. LoadModule usertrack_module modules/mod_usertrack.so
  160. LoadModule setenvif_module modules/mod_setenvif.so
  161. LoadModule mime_module modules/mod_mime.so
  162. LoadModule dav_module modules/mod_dav.so
  163. LoadModule status_module modules/mod_status.so
  164. LoadModule autoindex_module modules/mod_autoindex.so
  165. LoadModule info_module modules/mod_info.so
  166. LoadModule dav_fs_module modules/mod_dav_fs.so
  167. LoadModule vhost_alias_module modules/mod_vhost_alias.so
  168. LoadModule negotiation_module modules/mod_negotiation.so
  169. LoadModule dir_module modules/mod_dir.so
  170. LoadModule actions_module modules/mod_actions.so
  171. LoadModule speling_module modules/mod_speling.so
  172. LoadModule userdir_module modules/mod_userdir.so
  173. LoadModule alias_module modules/mod_alias.so
  174. LoadModule rewrite_module modules/mod_rewrite.so
  175. LoadModule proxy_module modules/mod_proxy.so
  176. LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
  177. LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
  178. LoadModule proxy_http_module modules/mod_proxy_http.so
  179. LoadModule proxy_connect_module modules/mod_proxy_connect.so
  180. LoadModule cache_module modules/mod_cache.so
  181. LoadModule suexec_module modules/mod_suexec.so
  182. LoadModule disk_cache_module modules/mod_disk_cache.so
  183. LoadModule file_cache_module modules/mod_file_cache.so
  184. LoadModule mem_cache_module modules/mod_mem_cache.so
  185. LoadModule cgi_module modules/mod_cgi.so
  186. #
  187. # The following modules are not loaded by default:
  188. #
  189. #LoadModule cern_meta_module modules/mod_cern_meta.so
  190. #LoadModule asis_module modules/mod_asis.so
  191. #
  192. # Load config files from the config directory "/etc/httpd/conf.d".
  193. #
  194. Include conf.d/*.conf
  195. #
  196. # ExtendedStatus controls whether Apache will generate "full" status
  197. # information (ExtendedStatus On) or just basic information (ExtendedStatus
  198. # Off) when the "server-status" handler is called. The default is Off.
  199. #
  200. #ExtendedStatus On
  201. #
  202. # If you wish httpd to run as a different user or group, you must run
  203. # httpd as root initially and it will switch.   
  204. #
  205. # User/Group: The name (or #number) of the user/group to run httpd as.
  206. #  . On SCO (ODT 3) use "User nouser" and "Group nogroup".
  207. #  . On HPUX you may not be able to use shared memory as nobody, and the
  208. #    suggested workaround is to create a user www and use that user.
  209. #  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
  210. #  when the value of (unsigned)Group is above 60000;  
  211. #  don't use Group #-1 on these systems!
  212. #
  213. User apache
  214. Group apache
  215. ### Section 2: 'Main' server configuration
  216. #
  217. # The directives in this section set up the values used by the 'main'
  218. # server, which responds to any requests that aren't handled by a
  219. # <VirtualHost> definition.  These values also provide defaults for
  220. # any <VirtualHost> containers you may define later in the file.
  221. #
  222. # All of these directives may appear inside <VirtualHost> containers,
  223. # in which case these default settings will be overridden for the
  224. # virtual host being defined.
  225. #
  226. #
  227. # ServerAdmin: Your address, where problems with the server should be
  228. # e-mailed.  This address appears on some server-generated pages, such
  229. # as error documents.  e.g. admin@your-domain.com
  230. #
  231. ServerAdmin root@localhost
  232. #
  233. # ServerName gives the name and port that the server uses to identify itself.
  234. # This can often be determined automatically, but we recommend you specify
  235. # it explicitly to prevent problems during startup.
  236. #
  237. # If this is not set to valid DNS name for your host, server-generated
  238. # redirections will not work.  See also the UseCanonicalName directive.
  239. #
  240. # If your host doesn't have a registered DNS name, enter its IP address here.
  241. # You will have to access it by its address anyway, and this will make  
  242. # redirections work in a sensible way.
  243. #
  244. #ServerName www.example.com:80
  245. ServerName hometranet
  246. #
  247. # UseCanonicalName: Determines how Apache constructs self-referencing  
  248. # URLs and the SERVER_NAME and SERVER_PORT variables.
  249. # When set "Off", Apache will use the Hostname and Port supplied
  250. # by the client.  When set "On", Apache will use the value of the
  251. # ServerName directive.
  252. #
  253. UseCanonicalName Off
  254. #
  255. # DocumentRoot: The directory out of which you will serve your
  256. # documents. By default, all requests are taken from this directory, but
  257. # symbolic links and aliases may be used to point to other locations.
  258. #
  259. #DocumentRoot "/var/www/html"
  260. DocumentRoot "/var"
  261. #
  262. # Each directory to which Apache has access can be configured with respect
  263. # to which services and features are allowed and/or disabled in that
  264. # directory (and its subdirectories).  
  265. #
  266. # First, we configure the "default" to be a very restrictive set of  
  267. # features.   
  268. #
  269. <Directory />
  270.     Options FollowSymLinks
  271.     AllowOverride None
  272. </Directory>
  273. #
  274. # Note that from this point forward you must specifically allow
  275. # particular features to be enabled - so if something's not working as
  276. # you might expect, make sure that you have specifically enabled it
  277. # below.
  278. #
  279. #
  280. # This should be changed to whatever you set DocumentRoot to.
  281. #
  282. #<Directory "/var/www/html">
  283. <Directory "/var">
  284. #
  285. # Possible values for the Options directive are "None", "All",
  286. # or any combination of:
  287. #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
  288. #
  289. # Note that "MultiViews" must be named *explicitly* --- "Options All"
  290. # doesn't give it to you.
  291. #
  292. # The Options directive is both complicated and important.  Please see
  293. # http://httpd.apache.org/docs/2.2/mod/core.html#options
  294. # for more information.
  295. #
  296.     Options Indexes FollowSymLinks
  297. #
  298. # AllowOverride controls what directives may be placed in .htaccess files.
  299. # It can be "All", "None", or any combination of the keywords:
  300. #   Options FileInfo AuthConfig Limit
  301. #
  302.      AllowOverride None
  303. #
  304. # Controls who can get stuff from this server.
  305. #
  306.     Order allow,deny
  307.     Allow from all
  308. </Directory>
  309. #
  310. # UserDir: The name of the directory that is appended onto a user's home
  311. # directory if a ~user request is received.
  312. #
  313. # The path to the end user account 'public_html' directory must be
  314. # accessible to the webserver userid.  This usually means that ~userid
  315. # must have permissions of 711, ~userid/public_html must have permissions
  316. # of 755, and documents contained therein must be world-readable.
  317. # Otherwise, the client will only receive a "403 Forbidden" message.
  318. #
  319. # See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
  320. #
  321. <IfModule mod_userdir.c>
  322.     #
  323.     # UserDir is disabled by default since it can confirm the presence
  324.     # of a username on the system (depending on home directory
  325.     # permissions).
  326.     #
  327.     UserDir disable
  328.     #
  329.     # To enable requests to /~user/ to serve the user's public_html
  330.     # directory, remove the "UserDir disable" line above, and uncomment
  331.     # the following line instead:
  332.     #  
  333.     #UserDir public_html
  334. </IfModule>
  335. #
  336. # Control access to UserDir directories.  The following is an example
  337. # for a site where these directories are restricted to read-only.
  338. #
  339. #<Directory /home/*/public_html>
  340. #    AllowOverride FileInfo AuthConfig Limit
  341. #    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
  342. #    <Limit GET POST OPTIONS>
  343. #        Order allow,deny
  344. #        Allow from all
  345. #    </Limit>
  346. #    <LimitExcept GET POST OPTIONS>
  347. #        Order deny,allow
  348. #        Deny from all
  349. #    </LimitExcept>
  350. #</Directory>
  351. #
  352. # DirectoryIndex: sets the file that Apache will serve if a directory
  353. # is requested.
  354. #
  355. # The index.html.var file (a type-map) is used to deliver content-
  356. # negotiated documents.  The MultiViews Option can be used for the  
  357. # same purpose, but it is much slower.
  358. #
  359. DirectoryIndex index.html index.html.var
  360. #
  361. # AccessFileName: The name of the file to look for in each directory
  362. # for additional configuration directives.  See also the AllowOverride
  363. # directive.
  364. #
  365. AccessFileName .htaccess
  366. #
  367. # The following lines prevent .htaccess and .htpasswd files from being  
  368. # viewed by Web clients.  
  369. #
  370. <Files ~ "^\.ht">
  371.     Order allow,deny
  372.   #  Deny from all
  373. Allow from all
  374. </Files>
  375. #
  376. # TypesConfig describes where the mime.types file (or equivalent) is
  377. # to be found.
  378. #
  379. TypesConfig /etc/mime.types
  380. #
  381. # DefaultType is the default MIME type the server will use for a document
  382. # if it cannot otherwise determine one, such as from filename extensions.
  383. # If your server contains mostly text or HTML documents, "text/plain" is
  384. # a good value.  If most of your content is binary, such as applications
  385. # or images, you may want to use "application/octet-stream" instead to
  386. # keep browsers from trying to display binary files as though they are
  387. # text.
  388. #
  389. DefaultType text/plain
  390. #
  391. # The mod_mime_magic module allows the server to use various hints from the
  392. # contents of the file itself to determine its type.  The MIMEMagicFile
  393. # directive tells the module where the hint definitions are located.
  394. #
  395. <IfModule mod_mime_magic.c>
  396. #   MIMEMagicFile /usr/share/magic.mime
  397.     MIMEMagicFile conf/magic
  398. </IfModule>
  399. #
  400. # HostnameLookups: Log the names of clients or just their IP addresses
  401. # e.g., www.apache.org (on) or 204.62.129.132 (off).
  402. # The default is off because it'd be overall better for the net if people
  403. # had to knowingly turn this feature on, since enabling it means that
  404. # each client request will result in AT LEAST one lookup request to the
  405. # nameserver.
  406. #
  407. HostnameLookups Off
  408. #
  409. # EnableMMAP: Control whether memory-mapping is used to deliver
  410. # files (assuming that the underlying OS supports it).
  411. # The default is on; turn this off if you serve from NFS-mounted  
  412. # filesystems.  On some systems, turning it off (regardless of
  413. # filesystem) can improve performance; for details, please see
  414. # http://httpd.apache.org/docs/2.2/m [...] enablemmap
  415. #
  416. #EnableMMAP off
  417. #
  418. # EnableSendfile: Control whether the sendfile kernel support is  
  419. # used to deliver files (assuming that the OS supports it).  
  420. # The default is on; turn this off if you serve from NFS-mounted  
  421. # filesystems.  Please see
  422. # http://httpd.apache.org/docs/2.2/m [...] lesendfile
  423. #
  424. #EnableSendfile off
  425. #
  426. # ErrorLog: The location of the error log file.
  427. # If you do not specify an ErrorLog directive within a <VirtualHost>
  428. # container, error messages relating to that virtual host will be
  429. # logged here.  If you *do* define an error logfile for a <VirtualHost>
  430. # container, that host's errors will be logged there and not here.
  431. #
  432. ErrorLog logs/error_log
  433. #
  434. # LogLevel: Control the number of messages logged to the error_log.
  435. # Possible values include: debug, info, notice, warn, error, crit,
  436. # alert, emerg.
  437. #
  438. LogLevel warn
  439. #
  440. # The following directives define some format nicknames for use with
  441. # a CustomLog directive (see below).
  442. #
  443. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  444. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  445. LogFormat "%{Referer}i -> %U" referer
  446. LogFormat "%{User-agent}i" agent
  447. # "combinedio" includes actual counts of actual bytes received (%I) and sent (%O); this
  448. # requires the mod_logio module to be loaded.
  449. #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  450. #
  451. # The location and format of the access logfile (Common Logfile Format).
  452. # If you do not define any access logfiles within a <VirtualHost>
  453. # container, they will be logged here.  Contrariwise, if you *do*
  454. # define per-<VirtualHost> access logfiles, transactions will be
  455. # logged therein and *not* in this file.
  456. #
  457. #CustomLog logs/access_log common
  458. #
  459. # If you would like to have separate agent and referer logfiles, uncomment
  460. # the following directives.
  461. #
  462. #CustomLog logs/referer_log referer
  463. #CustomLog logs/agent_log agent
  464. #
  465. # For a single logfile with access, agent, and referer information
  466. # (Combined Logfile Format), use the following directive:
  467. #
  468. CustomLog logs/access_log combined
  469. #
  470. # Optionally add a line containing the server version and virtual host
  471. # name to server-generated pages (internal error documents, FTP directory
  472. # listings, mod_status and mod_info output etc., but not CGI generated
  473. # documents or custom error documents).
  474. # Set to "EMail" to also include a mailto: link to the ServerAdmin.
  475. # Set to one of:  On | Off | EMail
  476. #
  477. ServerSignature On
  478. #
  479. # Aliases: Add here as many aliases as you need (with no limit). The format is  
  480. # Alias fakename realname
  481. #
  482. # Note that if you include a trailing / on fakename then the server will
  483. # require it to be present in the URL.  So "/icons" isn't aliased in this
  484. # example, only "/icons/".  If the fakename is slash-terminated, then the  
  485. # realname must also be slash terminated, and if the fakename omits the  
  486. # trailing slash, the realname must also omit it.
  487. #
  488. # We include the /icons/ alias for FancyIndexed directory listings.  If you
  489. # do not use FancyIndexing, you may comment this out.
  490. #
  491. Alias /icons/ "/var/www/icons/"
  492. <Directory "/var/www/icons">
  493.     Options Indexes MultiViews FollowSymLinks
  494.     AllowOverride None
  495.     Order allow,deny
  496.     Allow from all
  497. </Directory>
  498. #
  499. # WebDAV module configuration section.
  500. #  
  501. <IfModule mod_dav_fs.c>
  502.     # Location of the WebDAV lock database.
  503.     DAVLockDB /var/lib/dav/lockdb
  504. </IfModule>
  505. #
  506. # ScriptAlias: This controls which directories contain server scripts.
  507. # ScriptAliases are essentially the same as Aliases, except that
  508. # documents in the realname directory are treated as applications and
  509. # run by the server when requested rather than as documents sent to the client.
  510. # The same rules about trailing "/" apply to ScriptAlias directives as to
  511. # Alias.
  512. #
  513. ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
  514. #
  515. # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
  516. # CGI directory exists, if you have that configured.
  517. #
  518. <Directory "/var/www/cgi-bin">
  519.     AllowOverride None
  520.     Options None
  521.     Order allow,deny
  522.     Allow from all
  523. </Directory>
  524. #
  525. # Redirect allows you to tell clients about documents which used to exist in
  526. # your server's namespace, but do not anymore. This allows you to tell the
  527. # clients where to look for the relocated document.
  528. # Example:
  529. # Redirect permanent /foo http://www.example.com/bar
  530. #
  531. # Directives controlling the display of server-generated directory listings.
  532. #
  533. #
  534. # IndexOptions: Controls the appearance of server-generated directory
  535. # listings.
  536. #
  537. IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable
  538. #
  539. # AddIcon* directives tell the server which icon to show for different
  540. # files or filename extensions.  These are only displayed for
  541. # FancyIndexed directories.
  542. #
  543. AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
  544. AddIconByType (TXT,/icons/text.gif) text/*
  545. AddIconByType (IMG,/icons/image2.gif) image/*
  546. AddIconByType (SND,/icons/sound2.gif) audio/*
  547. AddIconByType (VID,/icons/movie.gif) video/*
  548. AddIcon /icons/binary.gif .bin .exe
  549. AddIcon /icons/binhex.gif .hqx
  550. AddIcon /icons/tar.gif .tar
  551. AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
  552. AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
  553. AddIcon /icons/a.gif .ps .ai .eps
  554. AddIcon /icons/layout.gif .html .shtml .htm .pdf
  555. AddIcon /icons/text.gif .txt
  556. AddIcon /icons/c.gif .c
  557. AddIcon /icons/p.gif .pl .py
  558. AddIcon /icons/f.gif .for
  559. AddIcon /icons/dvi.gif .dvi
  560. AddIcon /icons/uuencoded.gif .uu
  561. AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
  562. AddIcon /icons/tex.gif .tex
  563. AddIcon /icons/bomb.gif core
  564. AddIcon /icons/back.gif ..
  565. AddIcon /icons/hand.right.gif README
  566. AddIcon /icons/folder.gif ^^DIRECTORY^^
  567. AddIcon /icons/blank.gif ^^BLANKICON^^
  568. #
  569. # DefaultIcon is which icon to show for files which do not have an icon
  570. # explicitly set.
  571. #
  572. DefaultIcon /icons/unknown.gif
  573. #
  574. # AddDescription allows you to place a short description after a file in
  575. # server-generated indexes.  These are only displayed for FancyIndexed
  576. # directories.
  577. # Format: AddDescription "description" filename
  578. #
  579. #AddDescription "GZIP compressed document" .gz
  580. #AddDescription "tar archive" .tar
  581. #AddDescription "GZIP compressed tar archive" .tgz
  582. #
  583. # ReadmeName is the name of the README file the server will look for by
  584. # default, and append to directory listings.
  585. #
  586. # HeaderName is the name of a file which should be prepended to
  587. # directory indexes.  
  588. ReadmeName README.html
  589. HeaderName HEADER.html
  590. #
  591. # IndexIgnore is a set of filenames which directory indexing should ignore
  592. # and not include in the listing.  Shell-style wildcarding is permitted.
  593. #
  594. IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
  595. #
  596. # DefaultLanguage and AddLanguage allows you to specify the language of  
  597. # a document. You can then use content negotiation to give a browser a  
  598. # file in a language the user can understand.
  599. #
  600. # Specify a default language. This means that all data
  601. # going out without a specific language tag (see below) will  
  602. # be marked with this one. You probably do NOT want to set
  603. # this unless you are sure it is correct for all cases.
  604. #
  605. # * It is generally better to not mark a page as  
  606. # * being a certain language than marking it with the wrong
  607. # * language!
  608. #
  609. # DefaultLanguage nl
  610. #
  611. # Note 1: The suffix does not have to be the same as the language
  612. # keyword --- those with documents in Polish (whose net-standard
  613. # language code is pl) may wish to use "AddLanguage pl .po" to
  614. # avoid the ambiguity with the common suffix for perl scripts.
  615. #
  616. # Note 2: The example entries below illustrate that in some cases  
  617. # the two character 'Language' abbreviation is not identical to  
  618. # the two character 'Country' code for its country,
  619. # E.g. 'Danmark/dk' versus 'Danish/da'.
  620. #
  621. # Note 3: In the case of 'ltz' we violate the RFC by using a three char
  622. # specifier. There is 'work in progress' to fix this and get
  623. # the reference data for rfc1766 cleaned up.
  624. #
  625. # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
  626. # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
  627. # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
  628. # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
  629. # Norwegian (no) - Polish (pl) - Portugese (pt)
  630. # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
  631. # Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
  632. #
  633. AddLanguage ca .ca
  634. AddLanguage cs .cz .cs
  635. AddLanguage da .dk
  636. AddLanguage de .de
  637. AddLanguage el .el
  638. AddLanguage en .en
  639. AddLanguage eo .eo
  640. AddLanguage es .es
  641. AddLanguage et .et
  642. AddLanguage fr .fr
  643. AddLanguage he .he
  644. AddLanguage hr .hr
  645. AddLanguage it .it
  646. AddLanguage ja .ja
  647. AddLanguage ko .ko
  648. AddLanguage ltz .ltz
  649. AddLanguage nl .nl
  650. AddLanguage nn .nn
  651. AddLanguage no .no
  652. AddLanguage pl .po
  653. AddLanguage pt .pt
  654. AddLanguage pt-BR .pt-br
  655. AddLanguage ru .ru
  656. AddLanguage sv .sv
  657. AddLanguage zh-CN .zh-cn
  658. AddLanguage zh-TW .zh-tw
  659. #
  660. # LanguagePriority allows you to give precedence to some languages
  661. # in case of a tie during content negotiation.
  662. #
  663. # Just list the languages in decreasing order of preference. We have
  664. # more or less alphabetized them here. You probably want to change this.
  665. #
  666. LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
  667. #
  668. # ForceLanguagePriority allows you to serve a result page rather than
  669. # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
  670. # [in case no accepted languages matched the available variants]
  671. #
  672. ForceLanguagePriority Prefer Fallback
  673. #
  674. # Specify a default charset for all content served; this enables
  675. # interpretation of all content as UTF-8 by default.  To use the  
  676. # default browser choice (ISO-8859-1), or to allow the META tags
  677. # in HTML content to override this choice, comment out this
  678. # directive:
  679. #
  680. AddDefaultCharset UTF-8
  681. #
  682. # AddType allows you to add to or override the MIME configuration
  683. # file mime.types for specific file types.
  684. #
  685. #AddType application/x-tar .tgz
  686. #
  687. # AddEncoding allows you to have certain browsers uncompress
  688. # information on the fly. Note: Not all browsers support this.
  689. # Despite the name similarity, the following Add* directives have nothing
  690. # to do with the FancyIndexing customization directives above.
  691. #
  692. #AddEncoding x-compress .Z
  693. #AddEncoding x-gzip .gz .tgz
  694. # If the AddEncoding directives above are commented-out, then you
  695. # probably should define those extensions to indicate media types:
  696. #
  697. AddType application/x-compress .Z
  698. AddType application/x-gzip .gz .tgz
  699. #
  700. # AddHandler allows you to map certain file extensions to "handlers":
  701. # actions unrelated to filetype. These can be either built into the server
  702. # or added with the Action directive (see below)
  703. #
  704. # To use CGI scripts outside of ScriptAliased directories:
  705. # (You will also need to add "ExecCGI" to the "Options" directive.)
  706. #
  707. #AddHandler cgi-script .cgi
  708. #
  709. # For files that include their own HTTP headers:
  710. #
  711. #AddHandler send-as-is asis
  712. #
  713. # For type maps (negotiated resources):
  714. # (This is enabled by default to allow the Apache "It Worked" page
  715. #  to be distributed in multiple languages.)
  716. #
  717. AddHandler type-map var
  718. #
  719. # Filters allow you to process content before it is sent to the client.
  720. #
  721. # To parse .shtml files for server-side includes (SSI):
  722. # (You will also need to add "Includes" to the "Options" directive.)
  723. #
  724. AddType text/html .shtml
  725. AddOutputFilter INCLUDES .shtml
  726. #
  727. # Action lets you define media types that will execute a script whenever
  728. # a matching file is called. This eliminates the need for repeated URL
  729. # pathnames for oft-used CGI file processors.
  730. # Format: Action media/type /cgi-script/location
  731. # Format: Action handler-name /cgi-script/location
  732. #
  733. #
  734. # Customizable error responses come in three flavors:
  735. # 1) plain text 2) local redirects 3) external redirects
  736. #
  737. # Some examples:
  738. #ErrorDocument 500 "The server made a boo boo."
  739. #ErrorDocument 404 /missing.html
  740. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  741. #ErrorDocument 402 http://www.example.com/subscription_info.html
  742. #
  743. #
  744. # Putting this all together, we can internationalize error responses.
  745. #
  746. # We use Alias to redirect any /error/HTTP_<error>.html.var response to
  747. # our collection of by-error message multi-language collections.  We use  
  748. # includes to substitute the appropriate text.
  749. #
  750. # You can modify the messages' appearance without changing any of the
  751. # default HTTP_<error>.html.var files by adding the line:
  752. #
  753. #   Alias /error/include/ "/your/include/path/"
  754. #
  755. # which allows you to create your own set of files by starting with the
  756. # /var/www/error/include/ files and
  757. # copying them to /your/include/path/, even on a per-VirtualHost basis.
  758. #
  759. Alias /error/ "/var/www/error/"
  760. <IfModule mod_negotiation.c>
  761. <IfModule mod_include.c>
  762.     <Directory "/var/www/error">
  763.         AllowOverride None
  764.         Options IncludesNoExec
  765.         AddOutputFilter Includes html
  766.         AddHandler type-map var
  767.         Order allow,deny
  768.         Allow from all
  769.         LanguagePriority en es de fr
  770.         ForceLanguagePriority Prefer Fallback
  771.     </Directory>
  772. #    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
  773. #    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
  774. #    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
  775. #    ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
  776. #    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
  777. #    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
  778. #    ErrorDocument 410 /error/HTTP_GONE.html.var
  779. #    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
  780. #    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
  781. #    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
  782. #    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
  783. #    ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
  784. #    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
  785. #    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
  786. #    ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
  787. #    ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
  788. #    ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
  789. </IfModule>
  790. </IfModule>
  791. #
  792. # The following directives modify normal HTTP response behavior to
  793. # handle known problems with browser implementations.
  794. #
  795. BrowserMatch "Mozilla/2" nokeepalive
  796. BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
  797. BrowserMatch "RealPlayer 4\.0" force-response-1.0
  798. BrowserMatch "Java/1\.0" force-response-1.0
  799. BrowserMatch "JDK/1\.0" force-response-1.0
  800. #
  801. # The following directive disables redirects on non-GET requests for
  802. # a directory that does not include the trailing slash.  This fixes a  
  803. # problem with Microsoft WebFolders which does not appropriately handle  
  804. # redirects for folders with DAV methods.
  805. # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
  806. #
  807. BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
  808. BrowserMatch "MS FrontPage" redirect-carefully
  809. BrowserMatch "^WebDrive" redirect-carefully
  810. BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
  811. BrowserMatch "^gnome-vfs/1.0" redirect-carefully
  812. BrowserMatch "^XML Spy" redirect-carefully
  813. BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
  814. #
  815. # Allow server status reports generated by mod_status,
  816. # with the URL of http://servername/server-status
  817. # Change the ".example.com" to match your domain to enable.
  818. #
  819. #<Location /server-status>
  820. #    SetHandler server-status
  821. #    Order deny,allow
  822. #    Deny from all
  823. #    Allow from .example.com
  824. #</Location>
  825. #
  826. # Allow remote server configuration reports, with the URL of
  827. http://servername/server-info (requires that mod_info.c be loaded).
  828. # Change the ".example.com" to match your domain to enable.
  829. #
  830. #<Location /server-info>
  831. #    SetHandler server-info
  832. #    Order deny,allow
  833. #    Deny from all
  834. #    Allow from .example.com
  835. #</Location>
  836. #
  837. # Proxy Server directives. Uncomment the following lines to
  838. # enable the proxy server:
  839. #
  840. #<IfModule mod_proxy.c>
  841. #ProxyRequests On
  842. #
  843. #<Proxy *>
  844. #    Order deny,allow
  845. #    Deny from all
  846. #    Allow from .example.com
  847. #</Proxy>
  848. #
  849. # Enable/disable the handling of HTTP/1.1 "Via:" headers.
  850. # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
  851. # Set to one of: Off | On | Full | Block
  852. #
  853. #ProxyVia On
  854. #
  855. # To enable a cache of proxied content, uncomment the following lines.
  856. # See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.
  857. #
  858. #<IfModule mod_disk_cache.c>
  859. #   CacheEnable disk /
  860. #   CacheRoot "/var/cache/mod_proxy"
  861. #</IfModule>
  862. #
  863. #</IfModule>
  864. # End of proxy directives.
  865. ### Section 3: Virtual Hosts
  866. #
  867. # VirtualHost: If you want to maintain multiple domains/hostnames on your
  868. # machine you can setup VirtualHost containers for them. Most configurations
  869. # use only name-based virtual hosts so the server doesn't need to worry about
  870. # IP addresses. This is indicated by the asterisks in the directives below.
  871. #
  872. # Please see the documentation at  
  873. # <URL:http://httpd.apache.org/docs/2.2/vhosts/>
  874. # for further details before you try to setup virtual hosts.
  875. #
  876. # You may use the command line option '-S' to verify your virtual host
  877. # configuration.
  878. #
  879. # Use name-based virtual hosting.
  880. #
  881. #NameVirtualHost *:80
  882. #
  883. # NOTE: NameVirtualHost cannot be used without a port specifier  
  884. # (e.g. :80) if mod_ssl is being used, due to the nature of the
  885. # SSL protocol.
  886. #
  887. #
  888. # VirtualHost example:
  889. # Almost any Apache directive may go into a VirtualHost container.
  890. # The first VirtualHost section is used for requests without a known
  891. # server name.
  892. #
  893. #<VirtualHost *:80>
  894. #    ServerAdmin webmaster@dummy-host.example.com
  895. #    DocumentRoot /www/docs/dummy-host.example.com
  896. #    ServerName dummy-host.example.com
  897. #    ErrorLog logs/dummy-host.example.com-error_log
  898. #    CustomLog logs/dummy-host.example.com-access_log common
  899. #</VirtualHost>


 
voici ce que donne la commande iptables -L :  
 

Code :
  1. Chain INPUT (policy ACCEPT)
  2. target     prot opt source               destination       
  3. ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain
  4. ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:domain
  5. ACCEPT     udp  --  anywhere             anywhere            udp dpt:bootps
  6. ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:bootps
  7. RH-Firewall-1-INPUT  all  --  anywhere             anywhere           
  8. Chain FORWARD (policy ACCEPT)
  9. target     prot opt source               destination       
  10. ACCEPT     all  --  anywhere             192.168.122.0/24    state RELATED,ESTABLISHED
  11. ACCEPT     all  --  192.168.122.0/24     anywhere           
  12. ACCEPT     all  --  anywhere             anywhere           
  13. REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable
  14. REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable
  15. REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited
  16. Chain OUTPUT (policy ACCEPT)
  17. target     prot opt source               destination       
  18. Chain RH-Firewall-1-INPUT (1 references)
  19. target     prot opt source               destination       
  20. ACCEPT     all  --  anywhere             anywhere           
  21. ACCEPT     icmp --  anywhere             anywhere            icmp any
  22. ACCEPT     esp  --  anywhere             anywhere           
  23. ACCEPT     ah   --  anywhere             anywhere           
  24. ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:mdns
  25. ACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp
  26. ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ipp
  27. ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
  28. ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
  29. REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited


 
le repertoire DocumentRoot est en 777 (pour mes testes)

n°996533
Ik12
Posté le 31-12-2007 à 15:03:09  profilanswer
 

Faut configurer ton routeur pour que toutes les connections http soit renvoyer vers ton serveur.

 

Mon routeur speedtouch:
http://pix.nofrag.com/3/7/1/14e42384449a0d300afc47bf943cc.png

Message cité 1 fois
Message édité par Ik12 le 31-12-2007 à 15:06:18

---------------
on est au 21 siècle plus person ne écrit correctement sur les forum ni sur msn ni sur les SMS.
n°996534
zecrazytux
Posté le 31-12-2007 à 15:04:57  profilanswer
 

t'aurai pas pu mêtre plus long encore ?!
 
ça essai useCanonicalName à on
et ton serveur web m'a pas l'air joignable de l'extérieur, vu les regles iptables.  
Pour ouvrir: iptable -A INPUT -p tcp --dport 80 -j ACCEPT
 
clean un peu ton fichier de conf.
De plus un DocumentRoot à /var c'est quoi cette conf ?!


---------------
Blog photo/récits activités en montagne http://planetcaravan.net
n°996535
zecrazytux
Posté le 31-12-2007 à 15:06:22  profilanswer
 

Ik12 a écrit :

Faut configurer ton routeur pour que toutes les connections http soit renvoyer vers ton serveur.


 
effectivement les ports forwardés sur ta freebox on s'en fou (8080), il faut forwarder le port 80 vers l'ip de ton serveur (port 80 également)


---------------
Blog photo/récits activités en montagne http://planetcaravan.net
n°996538
jamesbond2
Posté le 31-12-2007 à 15:12:45  profilanswer
 

A IK12 :  
 
Mais je croyais que c'était ce que j'avais fait en redirigeant les ports 8080 tcp/udp vers l'ip locale de mon serveur 192.168.0.2 ?
 
A zecrazytux :  
 
oui je sais mais il s'agit de teste actuellement comme je l'ai préciser. De toute façon un DocumentRoot sur /home/monSite/www avait aussi précédemment échoué.
 
Et pour information j'ai déjà essayer  de rerouter le port 80, mais là il n'accède carément pas au serveur. Il me met "serveur inaccessible".
 
Je vais recommencer avec le port 80, on va voir
 
"effectivement les ports forwardés sur ta freebox on s'en fou (8080)", je ne comprend plus je croyais que c'était cette configuration qui orientait les requête de l'extérieur vers la bonne machine de l'intranet ????

n°996541
zecrazytux
Posté le 31-12-2007 à 15:17:34  profilanswer
 

Citation :

A IK12 :  
 
Mais je croyais que c'était ce que j'avais fait en redirigeant les ports 8080 tcp/udp vers l'ip locale de mon serveur 192.168.0.2 ?
 


 
HTTP c'est port 80 en TCP
 

Citation :


A zecrazytux :  
 
oui je sais mais il s'agit de teste actuellement comme je l'ai préciser. De toute façon un DocumentRoot sur /home/monSite/www avait aussi précédemment échoué.


C'est crade, test ou pas ! pourquoi ne pas laisser /var/www/ ?
 

Citation :


Et pour information j'ai déjà essayer  de rerouter le port 80, mais là il n'accède carément pas au serveur. Il me met "serveur inaccessible".


 
justement le port forwarding était bon, et le serveur inacessible car tes regles iptables t'empêchait d'y acceder !
 

Citation :


"effectivement les ports forwardés sur ta freebox on s'en fou (8080)", je ne comprend plus je croyais que c'était cette configuration qui orientait les requête de l'extérieur vers la bonne machine de l'intranet ????


pas sur le port 8080 sauf config bizarroide de ta part (un listen 8080 pour apache) et de toute façon un client va acceder à ton site via le port 80 donc la redirection était de toute façon incorrecte. (ne sert a rien)


Message édité par zecrazytux le 31-12-2007 à 15:18:45

---------------
Blog photo/récits activités en montagne http://planetcaravan.net
n°996542
jamesbond2
Posté le 31-12-2007 à 15:20:15  profilanswer
 

voila j'ai changer le port 8080 en port 80 sur tcp et udp.
 
Voici je message d'erreur à présent :  
 

Code :
  1. un problème s'est produit lors du chargement de http://82.XXX.XXX.XXX
  2. impossible de se connecter à l'hote 82.XXX.XXX.XXX


 
A noter que j'ai déjà mis un serveur de ce type en place sur une mandrake avec plein de virtualhost qui marchait très bien...

n°996547
zecrazytux
Posté le 31-12-2007 à 15:34:49  profilanswer
 

80 udp pas besoin, le http c'est du TCP.
 
as tu ouvert le port 80 sur ton serveur comme je te l'ai déja dit 3 fois ?


---------------
Blog photo/récits activités en montagne http://planetcaravan.net
mood
Publicité
Posté le 31-12-2007 à 15:34:49  profilanswer
 

n°996550
jamesbond2
Posté le 31-12-2007 à 15:40:34  profilanswer
 

Ce n'est pas le peine d'être désagréable. J'essaye d'apprendre c'est tout.  
 
Oui j'ai fait cette manipulation et j'ai ouvert SEULEMENT le port 80 tcp.
 
Mais il faut peut être que je redémarre complètement ma machine.
 

n°996554
o'gure
Modérateur
Multi grognon de B_L
Posté le 31-12-2007 à 15:47:56  profilanswer
 

Il n'y a pas besoin de redémarrer ta machine pour quoi que ce soit.
Met la configuration qui marche pour le réseau local.
Met sur la freebox le forward de port pour le port 80 vers l'adresse de ta machine et :
 - soit teste depuis l'extérieur de ton réseau (un ami, un cyber café...)
 - soit teste depuis ton réseau mais en utilisant un proxy qui lui se trouve sur internet.

 

Ne teste pas en utilisant ton adresse public depuis ton réseau local.


Message édité par o'gure le 31-12-2007 à 15:48:45

---------------
Relax. Take a deep breath !
n°996558
jamesbond2
Posté le 31-12-2007 à 15:55:11  profilanswer
 

Alors je ne comprends plus.
 
ça signifie que je ne peux pas accéder à mon site internet à partir d'un poste du réseaux local, même si j'utilise internet. (Ex http://ip_public/mon_fichier.php) ?
 
Je croyais que c'était possible ??!!!

n°996561
o'gure
Modérateur
Multi grognon de B_L
Posté le 31-12-2007 à 15:58:37  profilanswer
 

Ca dépend des routeurs, certains "n'aiment pas" ce genre de trafic. Pour la freebox je ne suis pas sûr (il me semble avoir déja eut des cas sur ce forum avec la freebox), c'est pour ca que je te donne la bonne manière pour tester correctement de manière sûre !

 

Ceci s'explique par le fait que certains routeurs mettent la règle du NAT (redirection de trafic pour le port 80 dans notre cas) uniquement pour le trafic qui provient réellement d'internet. La ton trafic provient du LAN, il se peut qui ne soit pas confronté.
Pour comprendre un peu mieux, renseigne toi par exemple sur comment marche netfilter.

 

edit: et ta phrase :
"ça signifie que je ne peux pas accéder à mon site internet à partir d'un poste du réseaux local, même si j'utilise internet."
n'est pas claire.

 

Ca veut juste dire que depuis ton LAN tu utilises l'adresse privée, et depuis internet tu utilises l'adresse public. C'est tout.

Message cité 1 fois
Message édité par o'gure le 31-12-2007 à 16:04:26

---------------
Relax. Take a deep breath !
n°996568
zecrazytux
Posté le 31-12-2007 à 16:24:43  profilanswer
 

o'gure a écrit :

Ca dépend des routeurs, certains "n'aiment pas" ce genre de trafic. Pour la freebox je ne suis pas sûr (il me semble avoir déja eut des cas sur ce forum avec la freebox), c'est pour ca que je te donne la bonne manière pour tester correctement de manière sûre !


 
Mon site/blog est hébergé dans mon placard derrière une freebox et je n'ai aucun problème.


---------------
Blog photo/récits activités en montagne http://planetcaravan.net
n°996572
zecrazytux
Posté le 31-12-2007 à 16:29:09  profilanswer
 

jamesbond2 a écrit :

Ce n'est pas le peine d'être désagréable. J'essaye d'apprendre c'est tout.  
 
Oui j'ai fait cette manipulation et j'ai ouvert SEULEMENT le port 80 tcp.
 
Mais il faut peut être que je redémarre complètement ma machine.
 


 
je ne suis pas désagréable. C'est toi qui a certainement mal pris le "comme je te l'ai déja dit 3 fois ?", mais je ne pouvais pas deviner puisque tu n'avais pas confirmé l'avoir fait !
 
D'ailleurs cette directive, il serai bon que tu l'intègre à ton script de filtrage car au redémarrage elle n'y sera plus.
 
 
bon, qu'on y voit un peu plus clair:
 
 
iptable -L
netstat -lapute
nmap ip_du_serveur


---------------
Blog photo/récits activités en montagne http://planetcaravan.net
n°996574
jamesbond2
Posté le 31-12-2007 à 16:33:17  profilanswer
 

cette manipulation : "iptable -A INPUT -p tcp --dport 80 -j ACCEPT " est-elle a effectuer à chaque fois que je redémarre ma machine ou un fois suffit ?
 
Ceci étant, le problème reste entier.
 
Ce qui me surprend le plus, c'est qu'un serveur mandrake 10 derrière une freebox (sur mon lieu de travail) avait déjà accueilli notre serveur interne de sauvegarde et ce serveur était tout à fait accessible depuis l'intranet par son ip public...
 
y aurait-il un paramètrage quelconque au niveau de mon firewall peut être ?
 
 
 

n°996576
jamesbond2
Posté le 31-12-2007 à 16:42:18  profilanswer
 

effectivement j'avais mal compris....
 
iptables -L :
 

Code :
  1. Chain INPUT (policy ACCEPT)
  2. target     prot opt source               destination       
  3. ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain
  4. ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:domain
  5. ACCEPT     udp  --  anywhere             anywhere            udp dpt:bootps
  6. ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:bootps
  7. RH-Firewall-1-INPUT  all  --  anywhere             anywhere           
  8. Chain FORWARD (policy ACCEPT)
  9. target     prot opt source               destination       
  10. ACCEPT     all  --  anywhere             192.168.122.0/24    state RELATED,ESTABLISHED
  11. ACCEPT     all  --  192.168.122.0/24     anywhere           
  12. ACCEPT     all  --  anywhere             anywhere           
  13. REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable
  14. REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable
  15. REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited
  16. Chain OUTPUT (policy ACCEPT)
  17. target     prot opt source               destination       
  18. Chain RH-Firewall-1-INPUT (1 references)
  19. target     prot opt source               destination       
  20. ACCEPT     all  --  anywhere             anywhere           
  21. ACCEPT     icmp --  anywhere             anywhere            icmp any
  22. ACCEPT     esp  --  anywhere             anywhere           
  23. ACCEPT     ah   --  anywhere             anywhere           
  24. ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:mdns
  25. ACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp
  26. ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ipp
  27. ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
  28. ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
  29. REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited


 
netstat -lapute :  
 

Code :
  1. Connexions Internet actives (serveurs et établies)
  2. Proto Recv-Q Send-Q Local Address               Foreign Address             State       Utilisatr  Inode      PID/Program name 
  3. tcp        0      0 hometranet:irdmi            *:*                         LISTEN      root       5342       2425/nasd         
  4. tcp        0      0 *:sunrpc                    *:*                         LISTEN      root       4536       2169/rpcbind       
  5. tcp        0      0 192.168.122.1:domain        *:*                         LISTEN      root       5622       2613/dnsmasq       
  6. tcp        0      0 hometranet:ipp              *:*                         LISTEN      root       5644       2614/cupsd         
  7. tcp        0      0 hometranet:smtp             *:*                         LISTEN      root       5285       2406/sendmail: acce
  8. tcp        0      0 *:46271                     *:*                         LISTEN      root       4666       2188/rpc.statd     
  9. tcp        0      0 *:http                      *:*                         LISTEN      root       8452       3103/httpd         
  10. tcp        0      0 *:ssh                       *:*                         LISTEN      root       5155       2385/sshd         
  11. tcp        0      0 *:https                     *:*                         LISTEN      root       8456       3103/httpd         
  12. udp        0      0 *:filenet-tms               *:*                                     root       4663       2188/rpc.statd     
  13. udp        0      0 *:filenet-rpc               *:*                                     avahi      5453       2522/avahi-daemon: 
  14. udp        0      0 *:filenet-nch               *:*                                     nobody     5630       2613/dnsmasq       
  15. udp        0      0 *:rrp                       *:*                                     root       4535       2169/rpcbind       
  16. udp        0      0 192.168.122.1:domain        *:*                                     root       5623       2613/dnsmasq       
  17. udp        0      0 *:bootps                    *:*                                     root       5615       2613/dnsmasq       
  18. udp        0      0 *:708                       *:*                                     root       4658       2188/rpc.statd     
  19. udp        0      0 *:bootpc                    *:*                                     root       4256       2070/dhclient     
  20. udp        0      0 *:mdns                      *:*                                     avahi      5452       2522/avahi-daemon: 
  21. udp        0      0 *:sunrpc                    *:*                                     root       4532       2169/rpcbind       
  22. udp        0      0 *:ipp                       *:*                                     root       5647       2614/cupsd


 
nmap 82.XXX.XXX.XXX
 

Code :
  1. Starting Nmap 4.20 ( http://insecure.org ) at 1999-06-12 16:40 CEST
  2. Interesting ports on vil69-6-82-239-196-198.fbx.proxad.net (82.239.196.198):
  3. Not shown: 1695 filtered ports
  4. PORT     STATE SERVICE
  5. 554/tcp  open  rtsp
  6. 9100/tcp open  jetdirect
  7. Nmap finished: 1 IP address (1 host up) scanned in 20.506 seconds

n°996588
zecrazytux
Posté le 31-12-2007 à 17:10:42  profilanswer
 

Le problème est que le port 80 n'est pas ouvert sur ton serveur. Si tu as bien tappé mon commande c'est étonnant...
 
je ne connais pas fedora (quelques tests il y a quelques années), essai de trouver où configurer le firewall ou où est placé le script de filtrage iptable.
 
J'ai l'habitude de scripter moi même un iptable-start et stop
 
en tout cas il te faut la règle suivante:
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
 
au démarrage !
 
edit: pas si étonnant, puisque la regle est rajouté après la policy rh-firewall-1-input qui prend tout le reste.
il faut au choix: modifier la policy rh-firewall-1-input pour y associer l'ouverture du port 80, soit ouvrir le port 80 avant d'appliquer la policy rh-...
 
pour tester: regles de bases pour accepter seulement http
(vide les regles iptables et autorise le port 80)
 
iptables -F  
iptables -P INPUT DROP
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT


Message édité par zecrazytux le 31-12-2007 à 17:19:25

---------------
Blog photo/récits activités en montagne http://planetcaravan.net
n°996591
jamesbond2
Posté le 31-12-2007 à 17:34:14  profilanswer
 

Voici le iptables après avoir effectué tes instructions :  
 

Code :
  1. Chain INPUT (policy DROP)
  2. target     prot opt source               destination       
  3. ACCEPT     all  --  anywhere             anywhere           
  4. ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http
  5. Chain FORWARD (policy ACCEPT)
  6. target     prot opt source               destination       
  7. Chain OUTPUT (policy ACCEPT)
  8. target     prot opt source               destination       
  9. Chain RH-Firewall-1-INPUT (0 references)
  10. target     prot opt source               destination

n°996593
zecrazytux
Posté le 31-12-2007 à 17:45:57  profilanswer
 

ça me semble correct.
 
un nmap sur l'ip du serveur devrait te donner une ligne:
 
80/tcp OPEN www ou http
 
et ton serveur devrait être joignable du reseau local ou du net si le port forwarding est correctement configuré


---------------
Blog photo/récits activités en montagne http://planetcaravan.net
n°996594
jamesbond2
Posté le 31-12-2007 à 17:53:10  profilanswer
 

le souci c'est que les instructions précédentes m'ont coupé d'internet, j'ai du redémarrer la machine.
 
Donc au démarrage je refais un :  
 

Code :
  1. iptables -A INPUT -p tcp --dport 80 -j ACCEPT


 
mais le nmap de me donne que :  
 

Code :
  1. 544/tcp open rtsp
  2. 9100/tcp open jetdirect


 
Faut-il qu'à chaque redémarrage je fasse toutes les instructions que tu m'a précisé ou le "iptables -A INPUT..." suffit ?

n°996600
zecrazytux
Posté le 31-12-2007 à 18:08:45  profilanswer
 

Citation :

le souci c'est que les instructions précédentes m'ont coupé d'internet, j'ai du redémarrer la machine.


 
Coupé internet de qui ? tu poste depuis le serveur ? tu accede au net en NAT derrière ce serveur ?
 
mes instructions autorisent seulement le port 80 en entrée. (tout en sortie, pas de ping)

Citation :


Code :
  1. iptables -A INPUT -p tcp --dport 80 -j ACCEPT


 
mais le nmap de me donne que :  
 

Code :
  1. 544/tcp open rtsp
  2. 9100/tcp open jetdirect




 
oui, comme dit dans mon "edit" d'un post précédent la règle est inefficace car après la policy rh-firewall-1-input.
insère là plutôt de cette manière:
iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT
 
 
celà aura pour effet d'insérer la règle en première position
 

Citation :


Faut-il qu'à chaque redémarrage je fasse toutes les instructions que tu m'a précisé ou le "iptables -A INPUT..." suffit ?


 
Avec l'insertion, seule cette instruction suffit. il faudrait l'ajouter dans un script pour eviter d'avoir a faire ça à la main à chaque fois


---------------
Blog photo/récits activités en montagne http://planetcaravan.net
n°996601
jamesbond2
Posté le 31-12-2007 à 18:18:20  profilanswer
 

SUPER !!!
 
j'ai saisi le nouvel iptables et mon nmap me renvoie bien  
 
80/tcp open http
 
et l'url suivante marche à présent http://82.XXX.XXX.XXX/index.html
 
Donc en gros tu dis au firewall de laisser passer les requetes du port 80 ? c'est ça ?
 
Cela dois venir du firewall fedora, car avec mon ancienne mandrake, je n'ai jamais eu à faire ça...
 

n°996603
zecrazytux
Posté le 31-12-2007 à 18:30:15  profilanswer
 

jamesbond2 a écrit :

SUPER !!!
 
j'ai saisi le nouvel iptables et mon nmap me renvoie bien  
 
80/tcp open http
 
et l'url suivante marche à présent http://82.XXX.XXX.XXX/index.html
 
Donc en gros tu dis au firewall de laisser passer les requetes du port 80 ? c'est ça ?
 
Cela dois venir du firewall fedora, car avec mon ancienne mandrake, je n'ai jamais eu à faire ça...
 


 
 
vi, alors le mieux pour comprendre tout ça c'est de lire un ti tuto iptables :)
 
en vitesse:
 
Des règles de filtrage iptables te permettent de décider quels ports ports sont ouverts ou fermés. de cette manière tu peux autoriser ou non des protocoles puisque ceux-cis utilisent un ou plusieurs ports, généralement définis (fixes)
 
Ainsi tu désire ouvrir le port 80 en entrée (tu est serveur, ce sont tes visiteurs qui viennent chez toi).
on ajoute/insere donc une regle pour celà dans la chaine INPUT.
 
Or la chain INPUT laisse une partie du filtrage à une chaine crée par fedora, la fameuse chaine RH-Firewall-1-INPUT
D'autres règles de filtrage sont donc définies dans cette chaine propre à fedora (red hat)
 
C'est pour ne pas mélanger les règles de base et les règles par défaut du niveau de sécurité de fedora (il y a en a plusieurs, au moins 3 de tête, et tu peux remarquer le chiffre 1 dans le nom de la chaine je supose donc que tu a choisis un niveau de sécurité faible pour ta distro :))
 
 
sur Mandriva, c'est shorewall qui est utilisé maintenant afin de définir les règles iptables mais je ne sais pas ce qui était mis en place sur la mandrake 10.  
Tout celà varie celon les distros, à  toi de t'adapter à celle que tu utilise (et de lire sa doc correspondante ;)). Sous Debian par exemple tout est ouvert, il n'y a pas de règle, pas de firewall, on écris nous même les règles.
 


---------------
Blog photo/récits activités en montagne http://planetcaravan.net
n°996607
jamesbond2
Posté le 31-12-2007 à 18:36:02  profilanswer
 

ok d'acc
 
Merci beaucoup en tout cas et BONNE ANNEE
 
Bye

mood
Publicité
Posté le   profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Linux et OS Alternatifs
  réseaux et sécurité

  Accès serveur apache par ip externe impossible ?

 

Sujets relatifs
clavier non reconnu et login impossible ubuntu serveurQuelle distribution de linux pour un serveur Squid?
Force Serveur counter-strike en 32 bits sur un serveur linux amd64Monter un petit serveur chez soi
[CHERCHE] Solution serveur RDC sous linuxServeur d'image GHOST (sous linux)
Impossible d'enregistrer une modification (samba)impossible d'installer libpcap [UBUNTU]
Installer PHP, Apache et Mysql5 
Plus de sujets relatifs à : Accès serveur apache par ip externe impossible ?


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