Mudanças entre as edições de "Servidor Apache+PHP"

De MediaWiki do Campus São José
Ir para navegação Ir para pesquisar
(New page: =ATL&L Telecom= ===Mandriva=== Escolha a opção 1 por ser mais estável urpmi apache Instalar o PHP urpmi apache-mod_php libphp5_common5 Reinicialize o serviço service http...)
 
Linha 10: Linha 10:
 
     service httpd restart
 
     service httpd restart
  
===Ubuntu===
 
    apt-get install apache2 php5
 
  
Editar /etc/apache2/apache2.conf
 
    DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 index.pl index.xhtml
 
 
Editar etc/apache2/ports.conf
 
    Listen 80
 
    Listen 443
 
 
Ativar modulos
 
    a2enmod ssl
 
    a2enmod rewrite
 
    a2enmod suexec
 
    a2enmod include
 
 
Reinicializar
 
    /etc/init.d/apache2 restart
 
  
 
===Testando o Apache e o PHP===
 
===Testando o Apache e o PHP===

Edição das 14h19min de 18 de julho de 2008

ATL&L Telecom

Mandriva

Escolha a opção 1 por ser mais estável

   urpmi apache

Instalar o PHP

   urpmi apache-mod_php libphp5_common5

Reinicialize o serviço

   service httpd restart


Testando o Apache e o PHP

No mandriva na pasta: /www/html No Ubuntu na pasta: /var/www

Abra um browser e coloque no endereço:

   http://localhost

Se aparecer uma mensagem "Its work"
o Apache está funcionando.

Agora para testar o PHP.
Crie com um editor de texto o arquivo teste.php e dentro escreva;

   <? phpinfo() ; ?>

Salve-o dentro da pasta indicada acima.
Abra o browser e digite:

   http://localhost/teste.php

Abrirá uma página com as informações do PHP, significa que está funcionando.