[HOW-TO] Installazione Apache2, PHP, Mysql e PhpMyAdmin
Moderator: ago
Il webserver si è installato, ho le informazioni di php, apache risponde, e tutto quanto, ma il mysql non funziona, mi da sempre degli acces denied, ho provato di tutto ma proprio niente.......provo a entrare nel phpmyadmin e non entra, sicuramente vorrette informazioni più dettagliate, ma non so cosa dirvi di più preciso.......voi chiedete io vi do le informazioni in più che vi servono...
php ---- ma mysql c'è o non c'è ?---
phpmyadmin, drupal, squirrelmail ...etc same problem
Cannot load mysql extension. Please check your PHP configuration.
PHP Version 5.2.5
System Linux vajra 2.6.23-gentoo-r3 #1 SMP Sat Dec 15 13:54:09 Local time zone must be set--see zic i686
Build Date Jan 13 2008 18:33:10
Configure Command './configure' '--prefix=/usr/lib/php5' '--host=i686-pc-linux-gnu' '--mandir=/usr/lib/php5/man' '--infodir=/usr/lib/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '--enable-maintainer-zts' '--disable-cli' '--with-apxs2=/usr/sbin/apxs2' '--with-config-file-path=/etc/php/apache2-php5' '--with-config-file-scan-dir=/etc/php/apache2-php5/ext-active' '--without-pear' '--enable-bcmath=shared' '--with-bz2=shared' '--enable-calendar=shared' '--with-curl=shared' '--with-curlwrappers' '--enable-dbase=shared' '--enable-exif=shared' '--with-fbsql=shared' '--with-fdftk=shared,/opt/fdftk-6.0' '--enable-ftp=shared' '--with-gettext=shared' '--with-gmp=shared' '--with-kerberos=/usr' '--enable-mbstring=shared' '--with-mcrypt=shared' '--with-mhash=shared' '--without-msql' '--without-mssql' '--with-ncurses=shared' '--with-openssl' '--with-openssl-dir=/usr' '--disable-pcntl' '--with-pgsql=shared' '--with-pspell=shared' '--without-recode' '--disable-shmop' '--with-snmp=shared' '--enable-soap=shared' '--enable-sockets=shared' '--without-sybase' '--without-sybase-ct' '--enable-sysvmsg=shared' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--with-tidy=shared' '--enable-wddx=shared' '--with-xmlrpc=shared' '--with-xsl=shared' '--enable-zip=shared' '--with-zlib=shared' '--enable-debug' '--enable-dba=shared' '--with-cdb' '--with-db4' '--with-flatfile' '--with-gdbm' '--with-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--enable-gd-jis-conv' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--with-gd' '--with-imap=shared' '--with-imap-ssl' '--with-interbase=/usr' '--with-ldap=shared' '--with-ldap-sasl' '--with-mysql=shared,/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-mysqli=shared,/usr/bin/mysql_config' '--with-unixODBC=shared,/usr' '--without-adabas' '--without-birdstep' '--with-dbmaker=shared' '--without-empress' '--without-esoob' '--without-ibm-db2' '--without-iodbc' '--without-sapdb' '--without-solid' '--without-pdo-dblib' '--with-pdo-mysql=shared,/usr' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-pgsql=shared' '--with-pdo-sqlite=shared,/usr' '--with-readline' '--without-libedit' '--without-mm' '--with-sqlite=/usr' '--enable-sqlite-utf8' '--with-pic'
Cannot load mysql extension. Please check your PHP configuration.
PHP Version 5.2.5
System Linux vajra 2.6.23-gentoo-r3 #1 SMP Sat Dec 15 13:54:09 Local time zone must be set--see zic i686
Build Date Jan 13 2008 18:33:10
Configure Command './configure' '--prefix=/usr/lib/php5' '--host=i686-pc-linux-gnu' '--mandir=/usr/lib/php5/man' '--infodir=/usr/lib/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '--enable-maintainer-zts' '--disable-cli' '--with-apxs2=/usr/sbin/apxs2' '--with-config-file-path=/etc/php/apache2-php5' '--with-config-file-scan-dir=/etc/php/apache2-php5/ext-active' '--without-pear' '--enable-bcmath=shared' '--with-bz2=shared' '--enable-calendar=shared' '--with-curl=shared' '--with-curlwrappers' '--enable-dbase=shared' '--enable-exif=shared' '--with-fbsql=shared' '--with-fdftk=shared,/opt/fdftk-6.0' '--enable-ftp=shared' '--with-gettext=shared' '--with-gmp=shared' '--with-kerberos=/usr' '--enable-mbstring=shared' '--with-mcrypt=shared' '--with-mhash=shared' '--without-msql' '--without-mssql' '--with-ncurses=shared' '--with-openssl' '--with-openssl-dir=/usr' '--disable-pcntl' '--with-pgsql=shared' '--with-pspell=shared' '--without-recode' '--disable-shmop' '--with-snmp=shared' '--enable-soap=shared' '--enable-sockets=shared' '--without-sybase' '--without-sybase-ct' '--enable-sysvmsg=shared' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--with-tidy=shared' '--enable-wddx=shared' '--with-xmlrpc=shared' '--with-xsl=shared' '--enable-zip=shared' '--with-zlib=shared' '--enable-debug' '--enable-dba=shared' '--with-cdb' '--with-db4' '--with-flatfile' '--with-gdbm' '--with-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--enable-gd-jis-conv' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--with-gd' '--with-imap=shared' '--with-imap-ssl' '--with-interbase=/usr' '--with-ldap=shared' '--with-ldap-sasl' '--with-mysql=shared,/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-mysqli=shared,/usr/bin/mysql_config' '--with-unixODBC=shared,/usr' '--without-adabas' '--without-birdstep' '--with-dbmaker=shared' '--without-empress' '--without-esoob' '--without-ibm-db2' '--without-iodbc' '--without-sapdb' '--without-solid' '--without-pdo-dblib' '--with-pdo-mysql=shared,/usr' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-pgsql=shared' '--with-pdo-sqlite=shared,/usr' '--with-readline' '--without-libedit' '--without-mm' '--with-sqlite=/usr' '--enable-sqlite-utf8' '--with-pic'
notice that ...
'--with-mysql=shared,/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' are both present in the phpinfo()
@xevilstar: i suppose you don't speak Italian, do you?
If it's true, i suggest you to search in Networking and Security Section (this section is intended to Italian folks
)
However... please post the output of
If it's true, i suggest you to search in Networking and Security Section (this section is intended to Italian folks
However... please post the output of
Code: Select all
emerge -pv php
I was born in a deep forest/I wish I could live here all my life/I am made from stones and roots/My home, these woods and roads
All my life I loved this sound/Of the woods all around/Eagles flies where the winds blows free
Journey is my destiny
All my life I loved this sound/Of the woods all around/Eagles flies where the winds blows free
Journey is my destiny
-
KinG-InFeT
- Apprentice

- Posts: 269
- Joined: Thu Oct 01, 2009 4:10 pm
- Location: Napoli
- Contact:
perdonatemi raga ma ho un 2 problemi...
mi va tutto alla grande fino alla visualizzazione della pagina per le informazioni info.php ed ècome se la pagina non venisse interpretata da php siccome mi esce solo la scritta ovvero il contenuto di essa
questo è il primo problema mentre il secondo non riesco ad installare phpmyadmin mi da il seguente errore
ho anche aggiunto le use flag sia al php che nel make.conf
e non sò più che fare...,mi potreste aiutare? grazie
mi va tutto alla grande fino alla visualizzazione della pagina per le informazioni info.php ed ècome se la pagina non venisse interpretata da php siccome mi esce solo la scritta ovvero il contenuto di essa
Code: Select all
<?php phpinfo(); ?>
Code: Select all
KinG-InFeT ~ # emerge phpmyadmin
Calculating dependencies... done!
emerge: there are no ebuilds built with USE flags to satisfy "dev-lang/php[crypt,ctype,filter,session,unicode]".
!!! One of the following packages is required to complete your request:
- dev-lang/php-5.2.13 (Change USE: +ctype +filter)
(dependency required by "dev-db/phpmyadmin-3.3.2" [ebuild])
(dependency required by "phpmyadmin" [argument])
KinG-InFeT ~ # Code: Select all
_NOTSET="-gnome -kde -qt3 -qt4 -nocxx -arts"
_CUSTOM="hal unicode X dbus alsa ipv6 python php apache2 session pam mysql xmlrpc imap exif gd pic odbc soap postgres snmp iconv crypt ctype filter session unicode"
_EDIROT="vim vim-syntax"
_IMAGE="png jpeg gif jpeg2k tiff"
_AUDIO="mp3 vorbis aac timidity flac ogg sid mad misepack sndfile speex opencore-amr gsm cue"
_VIDEO="theora v41 v412 vdpau x264 xvid schroedinger dirac"
USE="${}NOTSET} ${_CUSTOM} ${_EDITOR} ${_IMAGE} ${_AUDIO} ${_VIDEO}"My Site => http://www.kinginfet.net/
Dunque,
Riprova ad installare phpmyadmin.
Code: Select all
echo "dev-lang/php ctype filter" >> /etc/portage/package.use
emerge php-
KinG-InFeT
- Apprentice

- Posts: 269
- Joined: Thu Oct 01, 2009 4:10 pm
- Location: Napoli
- Contact:
perfetto grazie ora phpmyadmin è installato
il problema ora e che non leggendomi il php non mi funziona niente :S
il problema ora e che non leggendomi il php non mi funziona niente :S
My Site => http://www.kinginfet.net/
-
KinG-InFeT
- Apprentice

- Posts: 269
- Joined: Thu Oct 01, 2009 4:10 pm
- Location: Napoli
- Contact:
non sò quante volte l'ho fatto ma niente non mi interpreta le pagine in php :'(
edit però alla fine della compilazione ed installazione di php mi esce questo
se è come penso io mi uccido all'istante
RI-EDIT: HO INSTALLATO ANCHE QUEL PACCHETTO MA NIENTEEEEEEEEEEEE
INSTALLO IL PACCHETTO RICOMPILATO PHP RISTARTATO APACHE2 E NIENTE DA FARE....DURANTE L'EMERSIONE DI PHP MI ESCE DINUOVO QUEL MEX...
edit però alla fine della compilazione ed installazione di php mi esce questo
Code: Select all
* If you have additional third party PHP extensions (such as
* dev-php5/phpdbg) you may need to recompile them now.
*
* USE="pic" slows down PHP but has to be enabled on setups where TEXTRELs
* are disabled (e.g. when using PaX in the kernel). On hardened profiles this
* USE flag is enabled automaticallyRI-EDIT: HO INSTALLATO ANCHE QUEL PACCHETTO MA NIENTEEEEEEEEEEEE
My Site => http://www.kinginfet.net/
hai abilitato il modulo per php5 nella configurazione di apache?
Linux Registered User n. 373835
Titus Lucretius Carus, De Rerum Natura - Tantum religio potuit suadere malorum
Titus Lucretius Carus, De Rerum Natura - Tantum religio potuit suadere malorum
-
KinG-InFeT
- Apprentice

- Posts: 269
- Joined: Thu Oct 01, 2009 4:10 pm
- Location: Napoli
- Contact:
Code: Select all
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5"My Site => http://www.kinginfet.net/
- cloc3
- Advocate

- Posts: 4840
- Joined: Tue Jan 13, 2004 10:09 am
- Location: http://www.gentoo-users.org/user/cloc3/
- Contact:
-
KinG-InFeT
- Apprentice

- Posts: 269
- Joined: Thu Oct 01, 2009 4:10 pm
- Location: Napoli
- Contact:
no perdonami non volevo urlare e che mi si era bloccato il blocco maiuscolo ma non era mia intenzione urlare...comunque il risultato è il seguente
la parola pic mi esce di colore rosso
Code: Select all
KinG-InFeT ~ # emerge dev-lang/php --info|grep pic
USE="berkdb bzip2 cli crypt ctype exif filter gd gdbm iconv imap ipv6 ldap mysqli ncurses nls odbc pcre pic postgres readline reflection session snmp soap spell spl ssl truetype unicode xml xmlrpc zlib -adabas -apache2 -bcmath -birdstep -calendar -cdb -cgi -cjk -concurrentmodphp -curl -curlwrappers -db2 -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -fastbuild -fdftk -firebird -flatfile -force-cgi-redirect -frontbase -ftp -gd-external -gmp -hash -inifile -interbase -iodbc (-java-external) -json -kerberos -kolab -ldap-sasl -libedit -mcve -mhash -msql -mssql -mysql -oci8 -oci8-instant-client -pcntl -pdo -posix -qdbm -recode -sapdb -sharedext -sharedmem -simplexml -sockets -solid -sqlite -suhosin -sybase -sybase-ct -sysvipc -threads -tidy -tokenizer -wddx -xmlreader -xmlwriter -xpm -xsl -yaz -zip"
My Site => http://www.kinginfet.net/
-
KinG-InFeT
- Apprentice

- Posts: 269
- Joined: Thu Oct 01, 2009 4:10 pm
- Location: Napoli
- Contact:
- cloc3
- Advocate

- Posts: 4840
- Joined: Tue Jan 13, 2004 10:09 am
- Location: http://www.gentoo-users.org/user/cloc3/
- Contact:
KinG-InFeT wrote:mi si era bloccato il blocco maiuscolo
lasciamo perdere. compreso il fatto che ti sei agganciato a un howto datato del forum risorse con un problema personale poco attinente e che fai gli up senza attendere le 24 ore.
ma, a parte gli scherzi, osservo che nel tuo taglia incolla è dichiarata la presenza esplicita della use pic nella prima riga.
evidentemente, devi averla impostata in /etc/make.conf o in /etc/portage .
nel mio sistema, dove pic è determinata dalle condizioni di default, ho ... -pdo -pic ....
vu vu vu
gentù
mi piaci tu
gentù
mi piaci tu
-
KinG-InFeT
- Apprentice

- Posts: 269
- Joined: Thu Oct 01, 2009 4:10 pm
- Location: Napoli
- Contact:
niente da fare ho provato a levarlo riemerso php e restartato mysql e apache2 ma niente
provato a disabilitare con -pic riemerso php restartato tutto ma niente da fare alla fine dell'emerge continua ad esserci quel warning
e il php non ne vuole sapere di interpretare le pagine .....
provato a disabilitare con -pic riemerso php restartato tutto ma niente da fare alla fine dell'emerge continua ad esserci quel warning
e il php non ne vuole sapere di interpretare le pagine .....
My Site => http://www.kinginfet.net/
scusa, curiosita' potresti postare versioni e use flag di apache e php?
il fatto che non ti interpreta le pagine e' normalmente legato a apache che non trova o non ha riconosciuto l'interprete (tipo qualche problema di misconfigurazione dei mime-types).
la cosa e' risolvibile quindi vivamente suggerirei di partire da zero, brasando i file di configurazione modificati (SE li hai modificati) riemergendo con le USE corrette (e per quello magari se le posti vediamo che non ci siano casini tipo moduli o cgi o altro che faccia casino) e poi vediamo se il problema rimane.
ciao
il fatto che non ti interpreta le pagine e' normalmente legato a apache che non trova o non ha riconosciuto l'interprete (tipo qualche problema di misconfigurazione dei mime-types).
la cosa e' risolvibile quindi vivamente suggerirei di partire da zero, brasando i file di configurazione modificati (SE li hai modificati) riemergendo con le USE corrette (e per quello magari se le posti vediamo che non ci siano casini tipo moduli o cgi o altro che faccia casino) e poi vediamo se il problema rimane.
ciao
Gentoo user since 2004.
"It's all fun and games, until someone loses an eye" - mom
"It's all fun and games, until someone loses an eye" - mom
-
KinG-InFeT
- Apprentice

- Posts: 269
- Joined: Thu Oct 01, 2009 4:10 pm
- Location: Napoli
- Contact:
ho reinstallato tutto ma niente da fare...ecco le use
make.conf
/etc/portage/package.use
bhà
make.conf
Code: Select all
_SERVER = "apache2 mysql php session pam ssl xml xml2 berkdb innodb"Code: Select all
www-servers/apache ldap ssl
dev-db/mysql community perl ssl
dev-lang/php xmlrpc imap exif gd pic odbc soap postgres snmp iconv
My Site => http://www.kinginfet.net/
puoi postare l'output diKinG-InFeT wrote:ecco le use
Code: Select all
emerge -pv php apacheGentoo user since 2004.
"It's all fun and games, until someone loses an eye" - mom
"It's all fun and games, until someone loses an eye" - mom
-
KinG-InFeT
- Apprentice

- Posts: 269
- Joined: Thu Oct 01, 2009 4:10 pm
- Location: Napoli
- Contact:
eccole
Code: Select all
KinG-InFeT ~ # emerge -pv php apache
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild N ] www-servers/apache-2.2.15 USE="ldap ssl -debug -doc (-selinux) -static -suexec -threads" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias -asis -auth_digest -authn_dbd -cern_meta -charset_lite -dbd -dumpio -ident -imagemap -log_forensic -proxy -proxy_ajp -proxy_balancer -proxy_connect -proxy_ftp -proxy_http -substitute -version" APACHE2_MPMS="-event -itk -peruser -prefork -worker" 0 kB
[ebuild N ] dev-db/mysql-5.1.46 USE="community perl ssl -big-tables -cluster -debug -embedded -extraengine -latin1 -max-idx-128 -minimal -pbxt -profiling (-selinux) -static -test -xtradb" 0 kB
[ebuild N ] virtual/mysql-5.1 0 kB
[ebuild N ] dev-lang/php-5.2.13 USE="apache2 berkdb bzip2 cli crypt exif gdbm iconv ipv6 ldap mysql ncurses nls pcre readline reflection session spell spl ssl truetype unicode xml zlib -adabas -bcmath -birdstep -calendar -cdb -cgi -cjk -concurrentmodphp -ctype -curl -curlwrappers -db2 -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -fastbuild -fdftk -filter -firebird -flatfile -force-cgi-redirect -frontbase -ftp -gd -gd-external -gmp -hash -imap -inifile -interbase -iodbc (-java-external) -json -kerberos -kolab -ldap-sasl -libedit -mcve -mhash -msql -mssql -mysqli -oci8 -oci8-instant-client -odbc -pcntl -pdo -pic -posix -postgres -qdbm -recode -sapdb -sharedext -sharedmem -simplexml -snmp -soap -sockets -solid -sqlite -suhosin -sybase -sybase-ct -sysvipc -threads -tidy -tokenizer -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xsl -yaz -zip" 0 kB
Total: 4 packages (4 new), Size of downloads: 0 kB
KinG-InFeT ~ #
My Site => http://www.kinginfet.net/
allora personalmente posso suggerirti di abilitare due o tre flag in piu' in php che molte applicazioni usano, nelle mie use flag ho:KinG-InFeT wrote:eccole
...
Code: Select all
# grep php /etc/portage/package.use/devel
=dev-lang/php-5* apache2 bzip2 cli -cgi ctype curl -concurrentmodphp force-cgi-redirect filter gd hardenedphp hash memlimit mysql mysqli pdo -soap tokenizer threads tidy xml xmlreader xmlwriter xsl zip unicode truetype iconv -spell suhosin xpm -snmp expat sockets json -force-cgi-redirect simplexmlil che risulta in
Code: Select all
lifetree ~ # emerge -vp php
These are the packages that would be merged, in order:
Calculating dependencies ... done!
[ebuild R ] dev-lang/php-5.2.13 USE="apache2 berkdb bzip2 cli crypt ctype curl exif filter gd gdbm hash iconv ipv6 json mysql mysqli ncurses nls pcre pdo readline reflection session simplexml sockets spl ssl suhosin threads tidy tokenizer truetype unicode xml xmlreader xmlwriter xpm xsl zip zlib (-adabas) -bcmath (-birdstep) -calendar -cdb -cgi -cjk -concurrentmodphp -curlwrappers -db2 -dbase (-dbmaker) -debug -discard-path -doc (-empress) (-empress-bcs) (-esoob) -fastbuild (-fdftk) (-firebird) -flatfile -force-cgi-redirect (-frontbase) -ftp -gd-external -gmp -imap -inifile -interbase -iodbc (-java-external) -kerberos -kolab -ldap -ldap-sasl -libedit -mcve -mhash -msql -mssql -oci8 -oci8-instant-client -odbc -pcntl -pic -posix -postgres -qdbm -recode -sapdb -sharedext -sharedmem -snmp -soap (-solid) -spell -sqlite (-sybase) (-sybase-ct) -sysvipc -wddx -xmlrpc -yaz" 0 kB
Total: 1 package (1 reinstall), Size of downloads: 0 kBLe flag che ho adesso su apache sono configurate cosi:
Code: Select all
# grep servers\/apache /etc/portage/package.use/devel
www-servers/apache suexec -threadsCode: Select all
# grep -i apache /etc/make.conf
APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_default authn_file authz_default authz_groupfile authz_host authz_user autoindex cache deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias"
APACHE2_MPMS="itk"Code: Select all
# emerge -pv apache
These are the packages that would be merged, in order:
Calculating dependencies ... done!
[ebuild R ] www-servers/apache-2.2.15 USE="ssl suexec -debug -doc -ldap (-selinux) -static -threads" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_default authn_file authz_default authz_groupfile authz_host authz_user autoindex cache deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias -asis -auth_digest -authn_dbd -authn_dbm -authz_dbm -authz_owner -cern_meta -charset_lite -dav -dav_fs -dav_lock -dbd -dumpio -ident -imagemap -log_forensic -proxy -proxy_ajp -proxy_balancer -proxy_connect -proxy_ftp -proxy_http -substitute -version" APACHE2_MPMS="itk -event -peruser -prefork -worker" 0 kB
Total: 1 package (1 reinstall), Size of downloads: 0 kBCode: Select all
# grep OPT /etc/conf.d/apache2
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D SUEXEC -D LANGUAGE -D PHP5 -D USERDIR"
# /etc/init.d/apache2 restart
* Caching service dependencies ... [ ok ]
* Stopping apache2 ... [ ok ]
* Starting apache2 ... [ ok ]Code: Select all
# cat /var/www/localhost/htdocs/phpinfo.php
<?php phpinfo(); ?>considera che devi avere un'entry in /etc/hosts che associa il tuo hostname myhostname almeno a localhost:
Code: Select all
# cat /etc/hosts
127.0.0.1 myhostname localhostse tutto va bene puoi continuare a leggere o fermarti pure qui.
ora, se vuoi fare sviluppo web e hai bisogno di replicare l'accesso tramite hostname al posto che tramite sotto directory (o entrambe le cose per testare la portabilita' del tuo codice) hai bisogno di configurare un virtual host (vhost) per gestire le varie directory.
Di base crei un file 01_my_vhost.conf in /etc/apache2/vhosts.d/ e dentro inserisci questo di base:
Code: Select all
ServerName 127.0.0.1
<Directory /home/peach/public_html>
Order Allow,Deny
Allow from all
Options +indexes
</Directory>in seguito configuri i vari virtualhost che intendi gestire, per fare un esempio per farti capire come funziona con itk:
Code: Select all
<VirtualHost *:80>
ServerAdmin peach@localhost
DocumentRoot /home/peach/public_html/project
ServerName project.myhostname
ErrorLog /home/peach/public_html/logs/error_log
CustomLog /home/peach/public_html/logs/access_log common
DirectoryIndex index.htm, index.php
<Directory /home/peach/public_html/project>
Options All
AllowOverride All
Order allow,deny
Allow from All
</Directory>
<IfModule mpm_itk_module>
AssignUserID peach users
</IfModule>
</VirtualHost>Code: Select all
127.0.0.1 myhostname project.myhostnameOra dovresti teoricamente essere in grado di accedere al server dal browser sia tramite http://myhostname/~tuousername/project che tramite http://project.myhostname/
Fammi sapere.
Gentoo user since 2004.
"It's all fun and games, until someone loses an eye" - mom
"It's all fun and games, until someone loses an eye" - mom


