Visualizzazione dei risultati da 1 a 5 su 5

Discussione: [php - Apache]

  1. #1
    Utente di HTML.it
    Registrato dal
    Oct 2004
    Messaggi
    93

    [php - Apache]

    Ciao a tutti.
    Ecco il mio problema:
    Ho montato in locale easyphp e sto realizzando un sito, per provare tale sito dal browser in locale scrivo http://localhost/ oppure http://127.0.0.1/ e il tutto funziona. In seguito volevo provare se mentre ero connesso in rete con ad esempio il seguente indirizzo 147.123.34.12 e da un altro pc sempre connesso in rete dal browser ho provato a digitare http://147.123.34.12/ e mi aspettavo che vedessi il mio sito ma purtroppo nulla.

    Mi chiedo:
    1 - Si puo' fare?

    2 - Se si puo' fare cosa devo impostare?

    Ciao e grazie

  2. #2
    in teoria dovresti avere un ip statico e una corretta tabella di routing sul "router" appunto

    in pratica puoi farlo coi virtual server e indirizzo dinamico facendoti assegnare un Dynamic DNS per esempio: pippo.homelinux.com da http://www.dyndns.com/, altrimenti ogni volta che perdi la connessione e dunque l'ip diventa tutto impossibile.

    ricapitolando hai bisogno necessariamente di:
    1) un router che ti mista il traffico web (ovvero tutto quello sulla porta: 80) in e out sul tuo server
    il router può essere una scatolina tipo modem, oppure anche un vecchio pc correttamente custommizzato con linux; entrambi ti fanno anche da firewall.
    2A)un ip fisso che prendi insieme alla adsl pagando
    oppure
    2B)un account dynamic dns che ormai è di default su quasi tutti i router.

    in tutto ciò devi studiare un po per configurarti i servizi
    auguri

  3. #3
    Utente di HTML.it L'avatar di dottwatson
    Registrato dal
    Feb 2007
    Messaggi
    3,012
    devi modificare il file di configurazione di apache per "aprire" il server verso l' esterno

    questa sezione è la mia
    codice:
    <Directory "${path}/www">
        #
        # Possible values for the Options directive are "None", "All",
        # or any combination of:
        #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
        #
        # Note that "MultiViews" must be named *explicitly* --- "Options All"
        # doesn't give it to you.
        #
        # The Options directive is both complicated and important.  Please see
        # http://httpd.apache.org/docs/2.2/mod/core.html#options
        # for more information.
        #
        Options Indexes FollowSymLinks
    
        #
        # AllowOverride controls what directives may be placed in .htaccess files.
        # It can be "All", "None", or any combination of the keywords:
        #   Options FileInfo AuthConfig Limit
        #
        AllowOverride None
    
        #
        # Controls who can get stuff from this server.
        #
        Order allow,deny
        Allow from all
    
    </Directory>
    Allow from all

    deve essere così

    se hai cambiano mentre easy php gira ferma apache e riavvialo dopo la modifica

    per accedere al tuo server da un' altra macchina :

    su rete interna: http://tuo.ip.x.x/cartella_sito (per sapere il tuo ip di Intranet apri la shell dos e digita ipconfig

    accedere al tuo server da Internet: devi avere un Ip statico, no un IP che cambi ad ogni connessione

    Non sempre essere l'ultimo è un male... almeno non devi guardarti le spalle

    il mio profilo su PHPClasses e il mio blog laboweb

  4. #4
    Utente di HTML.it
    Registrato dal
    Oct 2004
    Messaggi
    93

    Ciao

    ciao,
    ho fatto esattamente come hai descritto nel tuo post ma purtroppo nulla!!
    Questa e' la realtiva sezione del mio file di configurazione di apache.

    Dove le opzioni commentate erano quelle prima della modifica, naturalmente appena fatte le modifiche ho chiuso e riaperto il tutto.

    Cosa posso fare per risolvere questo problema?

    Ciao

    <Directory "${path}/www">

    #
    # This may also be "None", "All", or any combination of "Indexes",
    # "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    #Options Indexes FollowSymLinks Includes
    Options Indexes FollowSymLinks
    #
    # This controls which options the .htaccess files in directories can
    # override. Can also be "All", or any combination of "Options", "FileInfo",
    # "AuthConfig", and "Limit"
    #
    #AllowOverride Yes
    AllowOverride None
    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all
    </Directory>

  5. #5
    Utente di HTML.it L'avatar di dottwatson
    Registrato dal
    Feb 2007
    Messaggi
    3,012
    hai ragione perchè adesso qui ti faccio vedere apache dove rimane in ascolto:
    hai 3 configurazioni :

    1- accetta connessioni da localhost e da qualsiasi richiesta esterna (http://tuo indirizzo di rete internet o intranet)
    codice:
    #
    # Listen: Allows you to bind Apache to specific IP addresses and/or
    # ports, instead of the default. See also the <VirtualHost>
    # directive.
    #
    # Change this to Listen on specific IP addresses as shown below to 
    # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
    #
    #Listen 127.0.0.1:80
    #Listen 192.168.0.51
    Listen 0.0.0.0:80
    #
    # Dynamic Shared Object (DSO) Support
    #
    # To be able to use the functionality of a module which was built as a DSO you
    # have to place corresponding `LoadModule' lines at this location so the
    # directives contained in it are actually available _before_ they are used.
    # Statically compiled modules (those listed by `httpd -l') do not need
    # to be loaded here.
    #
    2- accetta solo connessioni da localhost (http://localhost o 127.0.0.1)
    codice:
    #
    # Listen: Allows you to bind Apache to specific IP addresses and/or
    # ports, instead of the default. See also the <VirtualHost>
    # directive.
    #
    # Change this to Listen on specific IP addresses as shown below to 
    # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
    #
    Listen 127.0.0.1:80
    #Listen 192.168.0.51
    #Listen 0.0.0.0:80
    #
    # Dynamic Shared Object (DSO) Support
    #
    # To be able to use the functionality of a module which was built as a DSO you
    # have to place corresponding `LoadModule' lines at this location so the
    # directives contained in it are actually available _before_ they are used.
    # Statically compiled modules (those listed by `httpd -l') do not need
    # to be loaded here.
    #

    3- accetta connessioni solo su (http://192.168.0.51 anche se sei sul pc stesso)
    codice:
    #
    # Listen: Allows you to bind Apache to specific IP addresses and/or
    # ports, instead of the default. See also the <VirtualHost>
    # directive.
    #
    # Change this to Listen on specific IP addresses as shown below to 
    # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
    #
    #Listen 127.0.0.1:80
    Listen 192.168.0.51
    #Listen 0.0.0.0:80
    #
    # Dynamic Shared Object (DSO) Support
    #
    # To be able to use the functionality of a module which was built as a DSO you
    # have to place corresponding `LoadModule' lines at this location so the
    # directives contained in it are actually available _before_ they are used.
    # Statically compiled modules (those listed by `httpd -l') do not need
    # to be loaded here.
    #
    Non sempre essere l'ultimo è un male... almeno non devi guardarti le spalle

    il mio profilo su PHPClasses e il mio blog laboweb

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.