{"id":16245,"date":"2025-05-25T09:00:15","date_gmt":"2025-05-25T07:00:15","guid":{"rendered":"https:\/\/www.beseit.net\/?p=16245"},"modified":"2025-09-16T17:18:23","modified_gmt":"2025-09-16T15:18:23","slug":"fitxer-etc-host","status":"publish","type":"post","link":"https:\/\/www.beseit.net\/?p=16245","title":{"rendered":"Fitxer etc\/hosts"},"content":{"rendered":"\n<p><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f20f0f\" class=\"has-inline-color\">hosts<\/mark> NO &#8211;&gt; <s>hosts.txt<\/s><\/p>\n\n\n\n<p>a la carpeta etc\/hosts, he de crear un host.local que apunti a <a href=\"tel:192168149\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f10808\" class=\"has-inline-color\">192.168.1.49<\/mark><\/a> per que funcioni la web <a href=\"http:\/\/syn_sec.local\/polidic\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f70707\" class=\"has-inline-color\">http:\/\/syn_sec.local\/polidic<\/mark><\/a> dins de web station de synology<\/p>\n\n\n\n<p>S\u00ed, pots configurar un nom de domini local per accedir a la teva web en Synology Web Station. Els passos generals s\u00f3n:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>Editar el fitxer <\/strong><code>hosts<\/code><strong> del teu dispositiu<\/strong>\n<ul class=\"wp-block-list\">\n<li>Si fas servir Windows, obre un <mark style=\"background-color:rgba(0, 0, 0, 0);color:#d11919\" class=\"has-inline-color\">editor de text<\/mark> com a <mark style=\"background-color:rgba(0, 0, 0, 0);color:#ec0f0f\" class=\"has-inline-color\">administrador<\/mark> i edita el fitxer <a href=\"C:\\Windows\\System32\\drivers\\etc\\hosts.\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#f30f0f\" class=\"has-inline-color\"><code>C:\\Windows\\System32\\drivers\\etc\\hosts<\/code>.<\/mark><\/a><\/li>\n\n\n\n<li>Si fas servir macOS o Linux, edita <code>\/etc\/hosts<\/code> amb permisos d&#8217;administrador (<code>sudo nano \/etc\/hosts<\/code>).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Afegir una entrada al fitxer<\/strong> Afegeix una l\u00ednia com aquesta:<code><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#eb1010\" class=\"has-inline-color\">192.168.1.49 syn_sec.local<\/mark><\/strong><\/code><\/li>\n\n\n\n<li><strong>Configurar Web Station en Synology<\/strong> A Web Station, assegura&#8217;t que has definit <code><code><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#eb1010\" class=\"has-inline-color\">syn_sec.local<\/mark><\/strong><\/code><\/code> com a nom d&#8217;amfitri\u00f3 associat a la web. Veig que en la teva configuraci\u00f3 ja tens <code><code><code><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#eb1010\" class=\"has-inline-color\">syn_sec.local<\/mark><\/strong><\/code><\/code><\/code> registrat amb ports 80 i 443, aix\u00ed que sembla que vas en la direcci\u00f3 correcta.<\/li>\n\n\n\n<li><strong>Comprovar que funcioni<\/strong> Guarda els canvis i prova d&#8217;accedir a <code>http:\/\/<code><code><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#eb1010\" class=\"has-inline-color\">syn_sec.local<\/mark><\/strong><\/code><\/code>\/polidic<\/code> des del teu navegador.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"549\" height=\"282\" src=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2025\/05\/image-14.png\" alt=\"\" class=\"wp-image-16254\" srcset=\"https:\/\/www.beseit.net\/wp-content\/uploads\/2025\/05\/image-14.png 549w, https:\/\/www.beseit.net\/wp-content\/uploads\/2025\/05\/image-14-300x154.png 300w, https:\/\/www.beseit.net\/wp-content\/uploads\/2025\/05\/image-14-500x257.png 500w\" sizes=\"auto, (max-width: 549px) 100vw, 549px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code># Copyright (c) 1993-2009 Microsoft Corp.\n#\n# This is a sample HOSTS file used by Microsoft TCP\/IP for Windows.\n#\n# This file contains the mappings of IP addresses to host names. Each\n# entry should be kept on an individual line. The IP address should\n# be placed in the first column followed by the corresponding host name.\n# The IP address and the host name should be separated by at least one\n# space.\n#\n# Additionally, comments (such as these) may be inserted on individual\n# lines or following the machine name denoted by a '#' symbol.\n#\n# For example:\n#\n#      102.54.94.97     rhino.acme.com          # source server\n#       38.25.63.10     x.acme.com              # x client host\n\n# localhost name resolution is handled within DNS itself.\n#\t127.0.0.1       localhost\n#\t::1             localhost\n192.168.1.41 \tvalldoreix_etc.host\n\n192.168.1.49\tenglishnote.host\t# english_note\n192.168.1.49\tbeseit.host\t\t# beseit\n192.168.1.49\tbank.host\t\t# bank\t\n192.168.1.49    englishgrammar.host\t# english_gram\n\n192.168.1.49\tpolidic.host\t\t# 0capsa_dic\n\n\n\n<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">Sant Feliu amb synology_sec 192.168.0.49<\/h1>\n\n\n\n<p><\/p>\n\n\n\n<p>A <strong>Sant Feliu<\/strong> tenim com ip 192.168.<mark style=\"background-color:rgba(0, 0, 0, 0);color:#f00505\" class=\"has-inline-color\">0<\/mark>.1<br><br>i hosts ha quedat: <\/p>\n\n\n\n<p>192.168.0.49 0capsa49.cat<br>192.168.0.49 english.cat<br>192.168.0.49 beseit.cat<\/p>\n\n\n\n<p>A Valldoreix tenim com ip 192.168.<mark style=\"background-color:rgba(0, 0, 0, 0);color:#ef1616\" class=\"has-inline-color\">1<\/mark>.1<br><br>i hosts ha quedat:<\/p>\n\n\n\n<p>192.168.1.49 0capsa49.cat<br>192.168.1.49 english.cat<br>192.168.1.49 beseit.cat<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>hosts NO &#8211;&gt; hosts.txt a la carpeta etc\/hosts, he de crear un host.local que apunti a 192.168.1.49 per que funcioni la web http:\/\/syn_sec.local\/polidic dins de web station de synology S\u00ed, pots configurar un nom de domini local per accedir a &hellip; <a href=\"https:\/\/www.beseit.net\/?p=16245\">Continua llegint <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":3169,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[127],"tags":[],"class_list":["post-16245","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-servidors"],"_links":{"self":[{"href":"https:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/posts\/16245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.beseit.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16245"}],"version-history":[{"count":12,"href":"https:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/posts\/16245\/revisions"}],"predecessor-version":[{"id":16778,"href":"https:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/posts\/16245\/revisions\/16778"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.beseit.net\/index.php?rest_route=\/wp\/v2\/media\/3169"}],"wp:attachment":[{"href":"https:\/\/www.beseit.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.beseit.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.beseit.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}