Configuração VirtualHost

Iniciado por Anderson_comp, 29 de Outubro de 2010, 00:24

tópico anterior - próximo tópico

Anderson_comp

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:

sudo mkdir  /home/Anderson/public_html/


Movi meu site minha aplicação:

sudo mv Anderson /home/public_html


Permissão:

sudo chmod -R 755 public_html/




Configuração:

sudo gedit /etc/apache2/sites-enabled/000-default

Inseri:

<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:

sudo gedit /etc/hosts



Inseri:
127.0.0.1     anderson.td



Reiniciei o APACHE

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











zekkerj

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

Anderson_comp

Citação de: zekkerj online 29 de Outubro de 2010, 00:47
O erro vai aparecer em "/var/log/apache2/error_log", veja as últimas linhas desse arquivo.



[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

Anderson_comp

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


jmarcos16

olá, isso que vc postou está correto?
Citar
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!!!

Anderson_comp

Citação de: jmarcos16 online 29 de Outubro de 2010, 01:13
olá, isso que vc postou está correto?
Citar
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,,,,

Anderson_comp

Seguinte pessoal, eu executei:

sudo a2enmod rewrite

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

zekkerj

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