Autor Tópico: Configuração VirtualHost  (Lida 4005 vezes)

Offline Anderson_comp

  • Usuário Ubuntu
  • *
  • Mensagens: 5
    • Ver perfil
Configuração VirtualHost
« Online: 29 de Outubro de 2010, 00:24 »
Senhores, boa noite! Ja estou a algum tempo quebrando a cabeça, ja segui alguns tutoriais mais o problema persiste...

Vou explicar tudo que eu fiz, para verem se eu errei em alguma coisa:

Código: [Selecionar]
sudo mkdir  /home/Anderson/public_html/

Movi meu site minha aplicação:

Código: [Selecionar]
sudo mv Anderson /home/public_html

Permissão:

Código: [Selecionar]
sudo chmod -R 755 public_html/



Configuração:

Código: [Selecionar]
sudo gedit /etc/apache2/sites-enabled/000-default
Inseri:

Código: [Selecionar]
<VirtualHost *:80>
ServerAdmin administrador@gmail.com
DocumentRoot "/home/anderson/public_html/Anderson/public"
ServerName anderson.td
ServerAlias anderson.td
<Directory "/home/anderson/public_html/Anderson/public">
Options Includes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


Continua a configuração:

Código: [Selecionar]
sudo gedit /etc/hosts


Inseri:
Código: [Selecionar]
127.0.0.1     anderson.td


Reiniciei o APACHE

Código: [Selecionar]
sudo /etc/init.d/apache2 restart



Ai Tento acessar o SITE:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


 :-[

Acho que vale a pena informar que na minha pasta /public eu tenho um arquivo index.php....
Uma Luz por favor....

Desde ja agradeço











Offline zekkerj

  • Usuário Ubuntu
  • *
  • Mensagens: 19.735
  • Gratidão gera gratidão, lamúria atrai lamúria...
    • Ver perfil
    • Blog do Zekke
Re: Configuração VirtualHost
« Resposta #1 Online: 29 de Outubro de 2010, 00:47 »
O erro vai aparecer em "/var/log/apache2/error_log", veja as últimas linhas desse arquivo.
Pesquise antes de perguntar, sua dúvida pode já ter sido respondida.
Não respondo dúvidas por MP, coloque sua dúvida no fórum onde ela pode ser pesquisada pelos seus colegas!
Não venha ao fórum apenas para perguntar. Se você sabe a resposta de um problema, porque não ajudar seu colega? ;D

Offline Anderson_comp

  • Usuário Ubuntu
  • *
  • Mensagens: 5
    • Ver perfil
Re: Configuração VirtualHost
« Resposta #2 Online: 29 de Outubro de 2010, 00:51 »
O erro vai aparecer em "/var/log/apache2/error_log", veja as últimas linhas desse arquivo.


Código: [Selecionar]
[Fri Oct 29 00:29:46 2010] [alert] [client 127.0.0.1] /var/www/anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:31:36 2010] [alert] [client 127.0.0.1] /var/www/anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:31:41 2010] [alert] [client 127.0.0.1] /var/www/anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:31:43 2010] [alert] [client 127.0.0.1] /var/www/anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:31:45 2010] [alert] [client 127.0.0.1] /var/www/anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:31:46 2010] [alert] [client 127.0.0.1] /var/www/anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:32:25 2010] [alert] [client 127.0.0.1] /var/www/anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:32:29 2010] [alert] [client 127.0.0.1] /var/www/anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:33:09 2010] [alert] [client 127.0.0.1] /var/www/anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:33:22 2010] [alert] [client 127.0.0.1] /home/anderson/public_html/Anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration, referer: http://127.0.0.1/~anderson/
[Fri Oct 29 00:34:07 2010] [alert] [client 127.0.0.1] /var/www/anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:34:08 2010] [alert] [client 127.0.0.1] /var/www/anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:34:09 2010] [alert] [client 127.0.0.1] /var/www/anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:35:17 2010] [notice] caught SIGTERM, shutting down
[Fri Oct 29 00:35:18 2010] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.1 with Suhosin-Patch configured -- resuming normal operations
[Fri Oct 29 00:35:32 2010] [alert] [client 127.0.0.1] /home/anderson/public_html/Anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:35:35 2010] [alert] [client 127.0.0.1] /home/anderson/public_html/Anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:35:39 2010] [alert] [client 127.0.0.1] /home/anderson/public_html/Anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:35:42 2010] [error] [client 127.0.0.1] File does not exist: /var/www/php.index
[Fri Oct 29 00:35:44 2010] [error] [client 127.0.0.1] File does not exist: /var/www/php.index
[Fri Oct 29 00:36:02 2010] [error] [client 127.0.0.1] File does not exist: /var/www/Anderson
[Fri Oct 29 00:36:37 2010] [error] [client 127.0.0.1] PHP Warning:  require_once(Zend/Application.php): failed to open stream: No such file or directory in /var/www/anderson/public/index.php on line 18, referer: http://127.0.0.1/anderson/
[Fri Oct 29 00:36:37 2010] [error] [client 127.0.0.1] PHP Fatal error:  require_once(): Failed opening required 'Zend/Application.php' (include_path='/var/www/anderson/library:.:/usr/share/php:/usr/share/pear') in /var/www/anderson/public/index.php on line 18, referer: http://127.0.0.1/anderson/
[Fri Oct 29 00:36:40 2010] [error] [client 127.0.0.1] PHP Warning:  require_once(Zend/Application.php): failed to open stream: No such file or directory in /var/www/anderson/public/index.php on line 18
[Fri Oct 29 00:36:40 2010] [error] [client 127.0.0.1] PHP Fatal error:  require_once(): Failed opening required 'Zend/Application.php' (include_path='/var/www/anderson/library:.:/usr/share/php:/usr/share/pear') in /var/www/anderson/public/index.php on line 18
[Fri Oct 29 00:36:42 2010] [error] [client 127.0.0.1] PHP Warning:  require_once(Zend/Application.php): failed to open stream: No such file or directory in /var/www/anderson/public/index.php on line 18
[Fri Oct 29 00:36:42 2010] [error] [client 127.0.0.1] PHP Fatal error:  require_once(): Failed opening required 'Zend/Application.php' (include_path='/var/www/anderson/library:.:/usr/share/php:/usr/share/pear') in /var/www/anderson/public/index.php on line 18
[Fri Oct 29 00:36:43 2010] [error] [client 127.0.0.1] PHP Warning:  require_once(Zend/Application.php): failed to open stream: No such file or directory in /var/www/anderson/public/index.php on line 18
[Fri Oct 29 00:36:43 2010] [error] [client 127.0.0.1] PHP Fatal error:  require_once(): Failed opening required 'Zend/Application.php' (include_path='/var/www/anderson/library:.:/usr/share/php:/usr/share/pear') in /var/www/anderson/public/index.php on line 18
[Fri Oct 29 00:37:09 2010] [error] [client 127.0.0.1] PHP Warning:  require_once(Zend/Application.php): failed to open stream: No such file or directory in /var/www/anderson/public/index.php on line 18
[Fri Oct 29 00:37:09 2010] [error] [client 127.0.0.1] PHP Fatal error:  require_once(): Failed opening required 'Zend/Application.php' (include_path='/var/www/anderson/library:.:/usr/share/php:/usr/share/pear') in /var/www/anderson/public/index.php on line 18
[Fri Oct 29 00:37:11 2010] [error] [client 127.0.0.1] PHP Warning:  require_once(Zend/Application.php): failed to open stream: No such file or directory in /var/www/anderson/public/index.php on line 18
[Fri Oct 29 00:37:11 2010] [error] [client 127.0.0.1] PHP Fatal error:  require_once(): Failed opening required 'Zend/Application.php' (include_path='/var/www/anderson/library:.:/usr/share/php:/usr/share/pear') in /var/www/anderson/public/index.php on line 18
[Fri Oct 29 00:39:18 2010] [alert] [client 127.0.0.1] /home/anderson/public_html/Anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:40:22 2010] [alert] [client 127.0.0.1] /home/anderson/public_html/Anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:40:23 2010] [alert] [client 127.0.0.1] /home/anderson/public_html/Anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

Offline Anderson_comp

  • Usuário Ubuntu
  • *
  • Mensagens: 5
    • Ver perfil
Re: Configuração VirtualHost
« Resposta #3 Online: 29 de Outubro de 2010, 00:57 »
Eu não sabia que podia visualizar esses erros...
Eu vi o arquivo, e ja resolvi um... Estava Faltam uma pasta do ZEND...

Erros agora:

[Fri Oct 29 00:52:17 2010] [alert] [client 127.0.0.1] /home/anderson/public_html/Anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:53:05 2010] [alert] [client 127.0.0.1] /home/anderson/public_html/Anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:53:06 2010] [alert] [client 127.0.0.1] /home/anderson/public_html/Anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:53:16 2010] [alert] [client 127.0.0.1] /home/anderson/public_html/Anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Fri Oct 29 00:57:07 2010] [alert] [client 127.0.0.1] /home/anderson/public_html/Anderson/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration


Offline jmarcos16

  • Usuário Ubuntu
  • *
  • Mensagens: 86
  • Ubuntu 11.10 under GNOME 3
    • Ver perfil
Re: Configuração VirtualHost
« Resposta #4 Online: 29 de Outubro de 2010, 01:13 »
olá, isso que vc postou está correto?
Citar
Código: [Selecionar]
sudo mkdir  [b]/home/[color=red]Anderson[/color]/public_html/[/b][/quote]
[code]sudo mv Anderson [b]/home/public_html[/[/b]code]
[/quote]
[/code]
Liberte-se!!!

Offline Anderson_comp

  • Usuário Ubuntu
  • *
  • Mensagens: 5
    • Ver perfil
Re: Configuração VirtualHost
« Resposta #5 Online: 29 de Outubro de 2010, 08:09 »
olá, isso que vc postou está correto?
Citar
Código: [Selecionar]
sudo mkdir  [b]/home/[color=red]Anderson[/color]/public_html/[/b][/quote]
[code]sudo mv Anderson [b]/home/public_html[/[/b]code]
[/quote]
[/code]

Erro de digitação maus,,,,

Offline Anderson_comp

  • Usuário Ubuntu
  • *
  • Mensagens: 5
    • Ver perfil
Re: Configuração VirtualHost
« Resposta #6 Online: 29 de Outubro de 2010, 08:12 »
Seguinte pessoal, eu executei:

Código: [Selecionar]
sudo a2enmod rewrite
Código: [Selecionar]
sudo gedit /var/log/apache2/error_log
[Fri Oct 29 07:56:41 2010] [notice] caught SIGTERM, shutting down
[Fri Oct 29 07:56:42 2010] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.1 with Suhosin-Patch configured -- resuming normal operations
[Fri Oct 29 07:57:17 2010] [notice] caught SIGTERM, shutting down
[Fri Oct 29 07:57:18 2010] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.1 with Suhosin-Patch configured -- resuming normal operations


Porem, quando acesso o site ele pede para fazer o download do arquivo.... o arquivo em questão é index.phtml

 ???

o que sera?

Abraço a todos

Offline zekkerj

  • Usuário Ubuntu
  • *
  • Mensagens: 19.735
  • Gratidão gera gratidão, lamúria atrai lamúria...
    • Ver perfil
    • Blog do Zekke
Re: Configuração VirtualHost
« Resposta #7 Online: 29 de Outubro de 2010, 11:51 »
O PHP não está ativo. A modificação que vc fez pra corrigir o erro deve ter desativado o PHP.
Pesquise antes de perguntar, sua dúvida pode já ter sido respondida.
Não respondo dúvidas por MP, coloque sua dúvida no fórum onde ela pode ser pesquisada pelos seus colegas!
Não venha ao fórum apenas para perguntar. Se você sabe a resposta de um problema, porque não ajudar seu colega? ;D