View previous topic :: View next topic |
Author |
Message |
kNemo Tux's lil' helper
Joined: 03 Jun 2004 Posts: 116
|
Posted: Sun Jun 06, 2004 11:33 am Post subject: [APACHE] Impossibile aprire localhost [RISOLTO] |
|
|
Ho Appena emergiato apache mod_php
Code: | emerge -k apache mod_php |
poi l'ho messo in "avvio automatico"
Code: | rc-update add apache default |
Solo che quando viene caricato compare :
Code: | Starting Apache... [ !! ] |
Poi se provo ad aprire
http://127.0.0.1
http://localhost
mi dice :
The Connection was refused when attempting to contact 127.0.0.1
Come mai ?? _________________ Powered by:
Gentoo Base System version 1.4.16 (Kernel 2.4.26-gentoo-r9)
Portage 2.0.50-r9 (default-x86-2004.2, gcc-3.3.3, glibc-2.3.3.20040420-r1, 2.4.26-gentoo-r9)
ScreenShot
http://gendevel.altervista.org/home.php?s=oth&p=screensht
Last edited by kNemo on Mon Jun 14, 2004 11:24 am; edited 5 times in total |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30966 Location: here
|
Posted: Sun Jun 06, 2004 11:45 am Post subject: |
|
|
Posta il tuo /etc/hosts _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
kNemo Tux's lil' helper
Joined: 03 Jun 2004 Posts: 116
|
Posted: Sun Jun 06, 2004 11:49 am Post subject: /etc/hosts |
|
|
Code: |
127.0.0.1 localhost minasTirith.net
# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
|
_________________ Powered by:
Gentoo Base System version 1.4.16 (Kernel 2.4.26-gentoo-r9)
Portage 2.0.50-r9 (default-x86-2004.2, gcc-3.3.3, glibc-2.3.3.20040420-r1, 2.4.26-gentoo-r9)
ScreenShot
http://gendevel.altervista.org/home.php?s=oth&p=screensht |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30966 Location: here
|
Posted: Sun Jun 06, 2004 11:52 am Post subject: |
|
|
Prova a cambiare la linea
Code: | 127.0.0.1 localhost minasTirith.net |
con
Code: | 127.0.0.1 nomepc.minasTirith.net nomepc localhost |
dove nomepc e' il nome che hai dato alla tua macchina. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
kNemo Tux's lil' helper
Joined: 03 Jun 2004 Posts: 116
|
Posted: Sun Jun 06, 2004 11:59 am Post subject: |
|
|
Ok... Adesso Funziona...
Grazie Mille...
Ricordo che dopo aver modificato /etc/hosts bisogna riavviare apache... _________________ Powered by:
Gentoo Base System version 1.4.16 (Kernel 2.4.26-gentoo-r9)
Portage 2.0.50-r9 (default-x86-2004.2, gcc-3.3.3, glibc-2.3.3.20040420-r1, 2.4.26-gentoo-r9)
ScreenShot
http://gendevel.altervista.org/home.php?s=oth&p=screensht |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30966 Location: here
|
Posted: Sun Jun 06, 2004 12:02 pm Post subject: |
|
|
kNemo wrote: | Ok... Adesso Funziona...
Grazie Mille... |
Ottimo sono contento _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
kNemo Tux's lil' helper
Joined: 03 Jun 2004 Posts: 116
|
Posted: Sun Jun 06, 2004 1:35 pm Post subject: |
|
|
Sembrava risolto e invece...
Riavviando il PC e aprendo un browser...
# links http://127.0.0.1/test.php
Stesso errore di prima...
Guardando bene quando il PC e' appena acceso e non collegato a internet
in console mi trovo la scritta...
Code: | This is minasTirith.unknown_domain (Linux i686 2.4.25-gentoo-r1) |
Quando invece mi collego a internet e faccio un logout compare
Code: | This is minasTirith.net (Linux i686 2.4.25-gentoo-r1) |
e riavviando il server apache funziona correttamente...
Quindi...Come posso far funzionare apche anche quando sono offline ??? _________________ Powered by:
Gentoo Base System version 1.4.16 (Kernel 2.4.26-gentoo-r9)
Portage 2.0.50-r9 (default-x86-2004.2, gcc-3.3.3, glibc-2.3.3.20040420-r1, 2.4.26-gentoo-r9)
ScreenShot
http://gendevel.altervista.org/home.php?s=oth&p=screensht |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30966 Location: here
|
Posted: Sun Jun 06, 2004 1:37 pm Post subject: |
|
|
Devi fare
Code: | # echo nomedomanituo > /etc/dnsdomainname
# rc-update add domainname default
# /etc/init.d/domainname start |
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
kNemo Tux's lil' helper
Joined: 03 Jun 2004 Posts: 116
|
Posted: Sun Jun 06, 2004 4:43 pm Post subject: |
|
|
Per farlo Funzionare ho dovuto modificare /etc/hostname
e mettere minasTirith.net al posto di minasTirith....
Un Altra Cosa...
Come faccio a configurare Apache in modo che la dir /home/*/public_html
sia vista sul server ??? _________________ Powered by:
Gentoo Base System version 1.4.16 (Kernel 2.4.26-gentoo-r9)
Portage 2.0.50-r9 (default-x86-2004.2, gcc-3.3.3, glibc-2.3.3.20040420-r1, 2.4.26-gentoo-r9)
ScreenShot
http://gendevel.altervista.org/home.php?s=oth&p=screensht |
|
Back to top |
|
|
kNemo Tux's lil' helper
Joined: 03 Jun 2004 Posts: 116
|
Posted: Sat Jun 12, 2004 12:11 pm Post subject: |
|
|
Non riesco a trovare dove settare "public_html"...
"UserDir" non esiste... _________________ Powered by:
Gentoo Base System version 1.4.16 (Kernel 2.4.26-gentoo-r9)
Portage 2.0.50-r9 (default-x86-2004.2, gcc-3.3.3, glibc-2.3.3.20040420-r1, 2.4.26-gentoo-r9)
ScreenShot
http://gendevel.altervista.org/home.php?s=oth&p=screensht |
|
Back to top |
|
|
randomaze Bodhisattva
Joined: 21 Oct 2003 Posts: 9985
|
Posted: Sat Jun 12, 2004 8:55 pm Post subject: |
|
|
Non capisco la domanda.
in generale per configurare apache i files sono:
Code: |
/etc/apache2/conf/*.conf
|
e per le opzioni all'avvio:
Code: |
/etc/conf.d/apache2
|
poi se la tua domanda era un'altra prova a spiegarti meglio.... _________________ Ciao da me! |
|
Back to top |
|
|
kNemo Tux's lil' helper
Joined: 03 Jun 2004 Posts: 116
|
Posted: Sun Jun 13, 2004 6:59 am Post subject: |
|
|
La mia configurazione di apache2 adesso mi permette soltanto di andare a vedere le pagine presenti in htdocs...
Io voglio settare apache in modo che se gli utenti creano nella loro home una cartella chiamata public_html questa sia visibile su apache all'indirizzo
http://localhost/~nomeUtente/paginaUtente.php
Spero di essere stato chiaro... _________________ Powered by:
Gentoo Base System version 1.4.16 (Kernel 2.4.26-gentoo-r9)
Portage 2.0.50-r9 (default-x86-2004.2, gcc-3.3.3, glibc-2.3.3.20040420-r1, 2.4.26-gentoo-r9)
ScreenShot
http://gendevel.altervista.org/home.php?s=oth&p=screensht |
|
Back to top |
|
|
gutter Bodhisattva
Joined: 13 Mar 2004 Posts: 7162 Location: Aarau, Aargau, Switzerland
|
Posted: Sun Jun 13, 2004 7:23 am Post subject: |
|
|
kNemo wrote: | La mia configurazione di apache2 adesso mi permette soltanto di andare a vedere le pagine presenti in htdocs...
Io voglio settare apache in modo che se gli utenti creano nella loro home una cartella chiamata public_html questa sia visibile su apache all'indirizzo
http://localhost/~nomeUtente/paginaUtente.php
Spero di essere stato chiaro... |
Ti basta aggiungere queste tre righe nel file /etc/apache2/conf/commonapache2.conf
Code: |
<IfModule mod_userdir.c>
UserDir public_html
</IfModule>
|
_________________ Registered as User #281564 and Machines #163761 |
|
Back to top |
|
|
kNemo Tux's lil' helper
Joined: 03 Jun 2004 Posts: 116
|
Posted: Sun Jun 13, 2004 8:59 am Post subject: |
|
|
Adesso quando tento di raggiungere l'indirizzo :
http://localhost/~nemo/info.php
mi dice che non ho il permesso ??? come mai ?
Quote: |
Forbidden
You don't have permission to access /~nemo/info.php on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
--------------------------------------------
Apache/2.0.49 (Gentoo/Linux) mod_ssl/2.0.49 OpenSSL/0.9.7d PHP/4.3.6 Server at localhost Port 80
|
_________________ Powered by:
Gentoo Base System version 1.4.16 (Kernel 2.4.26-gentoo-r9)
Portage 2.0.50-r9 (default-x86-2004.2, gcc-3.3.3, glibc-2.3.3.20040420-r1, 2.4.26-gentoo-r9)
ScreenShot
http://gendevel.altervista.org/home.php?s=oth&p=screensht |
|
Back to top |
|
|
randomaze Bodhisattva
Joined: 21 Oct 2003 Posts: 9985
|
Posted: Mon Jun 14, 2004 8:13 am Post subject: |
|
|
Perché apache gira con un utente diverso dal tuo.
Prova a fare qualcosa del genere:
Code: |
chmod 755 /home/nemo
chmod 755 /home/nemo/public_html
chmod 755 /home/nemo/public_html/info.php
|
_________________ Ciao da me! |
|
Back to top |
|
|
kNemo Tux's lil' helper
Joined: 03 Jun 2004 Posts: 116
|
Posted: Mon Jun 14, 2004 11:20 am Post subject: |
|
|
Adesso Funziona...
Grazie Mille... _________________ Powered by:
Gentoo Base System version 1.4.16 (Kernel 2.4.26-gentoo-r9)
Portage 2.0.50-r9 (default-x86-2004.2, gcc-3.3.3, glibc-2.3.3.20040420-r1, 2.4.26-gentoo-r9)
ScreenShot
http://gendevel.altervista.org/home.php?s=oth&p=screensht |
|
Back to top |
|
|
|